From a655db34f8ed53b8d0363e677ddaf6a94986a2d0 Mon Sep 17 00:00:00 2001 From: vinceliuice Date: Tue, 14 Feb 2023 18:00:15 +0800 Subject: [PATCH] update --- shell/lib-install.sh | 4 +- .../firefox/Monterey/parts/video-player.css | 75 +++++++++++++++++++ src/other/firefox/WhiteSur/colors/dark.css | 2 +- src/other/firefox/WhiteSur/icons/icon.svg | 60 +++++++++++++++ src/other/firefox/WhiteSur/pages/newtab.css | 9 +++ .../WhiteSur/pages/privatebrowsing.css | 16 ++++ .../firefox/WhiteSur/parts/video-player.css | 75 +++++++++++++++++++ src/other/firefox/WhiteSur/theme.css | 5 +- src/other/firefox/userContent-Monterey.css | 5 ++ src/other/firefox/userContent-WhiteSur.css | 5 ++ 10 files changed, 253 insertions(+), 3 deletions(-) create mode 100644 src/other/firefox/Monterey/parts/video-player.css create mode 100644 src/other/firefox/WhiteSur/icons/icon.svg create mode 100644 src/other/firefox/WhiteSur/pages/newtab.css create mode 100644 src/other/firefox/WhiteSur/pages/privatebrowsing.css create mode 100644 src/other/firefox/WhiteSur/parts/video-player.css create mode 100644 src/other/firefox/userContent-Monterey.css create mode 100644 src/other/firefox/userContent-WhiteSur.css diff --git a/shell/lib-install.sh b/shell/lib-install.sh index 7b76e9f2..9c056ca1 100755 --- a/shell/lib-install.sh +++ b/shell/lib-install.sh @@ -678,7 +678,8 @@ install_firefox_theme() { if [[ "${monterey}" == 'true' ]]; then udo cp -rf "${FIREFOX_SRC_DIR}"/Monterey "${TARGET_DIR}" - udo cp -rf "${FIREFOX_SRC_DIR}"/WhiteSur/{icons,titlebuttons} "${TARGET_DIR}"/Monterey + udo cp -rf "${FIREFOX_SRC_DIR}"/WhiteSur/{icons,titlebuttons,pages} "${TARGET_DIR}"/Monterey + udo cp -rf "${FIREFOX_SRC_DIR}"/userContent-Monterey.css "${TARGET_DIR}"/userContent.css if [[ "${alttheme}" == 'true' ]]; then udo cp -rf "${FIREFOX_SRC_DIR}"/userChrome-Monterey-alt.css "${TARGET_DIR}"/userChrome.css else @@ -687,6 +688,7 @@ install_firefox_theme() { else udo cp -rf "${FIREFOX_SRC_DIR}"/WhiteSur "${TARGET_DIR}" udo cp -rf "${FIREFOX_SRC_DIR}"/userChrome-WhiteSur.css "${TARGET_DIR}"/userChrome.css + udo cp -rf "${FIREFOX_SRC_DIR}"/userContent-WhiteSur.css "${TARGET_DIR}"/userContent.css fi config_firefox diff --git a/src/other/firefox/Monterey/parts/video-player.css b/src/other/firefox/Monterey/parts/video-player.css new file mode 100644 index 00000000..bc8a6a03 --- /dev/null +++ b/src/other/firefox/Monterey/parts/video-player.css @@ -0,0 +1,75 @@ +@namespace xul url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); +@namespace html url("http://www.w3.org/1999/xhtml"); + +/** Video player **/ + +.progressBar::-moz-progress-bar { + background-color: #fff !important; +} + +.scrubber:hover::-moz-range-thumb, +.volumeControl:hover::-moz-range-thumb { + background-color: #ccc !important; +} + +.scrubber:active::-moz-range-thumb, +.volumeControl:active::-moz-range-thumb { + background-color: #bbb !important; +} + +.controlBar { + border-radius: 5px; + margin: auto; + margin-bottom: 5px; + width: 98.5%; + max-width: 800px; + height: 30px !important; + background-color: rgba(20,20,20,0.8) !important; +} + +.controlBar > .button:enabled:hover { + fill: #ccc !important; +} + +.controlBar > .button:enabled:hover:active { + fill: #bbb !important; +} + +.scrubberStack { + margin: 0 10px; +} + +.playButton { + scale: 0.8; +} + + + +/** Vertical Volume Bar **/ +/* I'm to stupid to get this working. Wasn't able to set proper position relative to mute button */ + +/* .muteButton:hover ~ .volumeStack{ + margin-bottom: 129px !important; + } + .volumeStack:hover { + margin-bottom: 129px !important; + } + + .volumeStack { + transform: rotate(270deg); + max-height: 33px !important; + min-width: 100px !important; + position:absolute !important; + margin-bottom: -150px !important; + background-color: rgba(20,20,20,0.8) !important; + border-bottom-right-radius: 5px !important; + border-top-right-radius: 5px !important; + transition-property: margin-bottom; + transition-duration: 0.13s; + transition-timing-function: linear; + } + + .volumeControl{ + width: 92% !important; + margin-left: 5px !important; +} */ diff --git a/src/other/firefox/WhiteSur/colors/dark.css b/src/other/firefox/WhiteSur/colors/dark.css index b09e295d..8d74239a 100644 --- a/src/other/firefox/WhiteSur/colors/dark.css +++ b/src/other/firefox/WhiteSur/colors/dark.css @@ -8,7 +8,7 @@ @media (prefers-color-scheme: dark) { :root { /* Browser area before a page starts loading */ - --gnome-browser-before-load-background: #333333; + --gnome-browser-before-load-background: #242424; --theme-primary-color: #315bef; /* Toolbars */ diff --git a/src/other/firefox/WhiteSur/icons/icon.svg b/src/other/firefox/WhiteSur/icons/icon.svg new file mode 100644 index 00000000..c832d960 --- /dev/null +++ b/src/other/firefox/WhiteSur/icons/icon.svg @@ -0,0 +1,60 @@ + + + + + + + + + + + diff --git a/src/other/firefox/WhiteSur/pages/newtab.css b/src/other/firefox/WhiteSur/pages/newtab.css new file mode 100644 index 00000000..1c94e842 --- /dev/null +++ b/src/other/firefox/WhiteSur/pages/newtab.css @@ -0,0 +1,9 @@ +/* about:newtab */ + +@-moz-document url("about:newtab"), url("about:home") { + body { + --newtab-background-color: var(--gnome-browser-before-load-background) !important; + --newtab-background-color-secondary: var(--gnome-menu-background) !important; + --newtab-primary-action-background: var(--gnome-accent) !important; + } +} diff --git a/src/other/firefox/WhiteSur/pages/privatebrowsing.css b/src/other/firefox/WhiteSur/pages/privatebrowsing.css new file mode 100644 index 00000000..e1600ec4 --- /dev/null +++ b/src/other/firefox/WhiteSur/pages/privatebrowsing.css @@ -0,0 +1,16 @@ +/* about:privatebrowsing */ + +@-moz-document url("about:privatebrowsing") { + html.private { + --in-content-page-background: var(--gnome-private-in-content-page-background) !important; + + /* Used by headings in promo boxes Firefox shows (like an ad for Firefox Focus) */ + --in-content-text-color: var(--gnome-private-text-primary-color) !important; + } + .wordmark { + fill: var(--gnome-private-wordmark) !important; + } + .showPrivate { + color: var(--gnome-private-text-primary-color); + } +} diff --git a/src/other/firefox/WhiteSur/parts/video-player.css b/src/other/firefox/WhiteSur/parts/video-player.css new file mode 100644 index 00000000..bc8a6a03 --- /dev/null +++ b/src/other/firefox/WhiteSur/parts/video-player.css @@ -0,0 +1,75 @@ +@namespace xul url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); +@namespace html url("http://www.w3.org/1999/xhtml"); + +/** Video player **/ + +.progressBar::-moz-progress-bar { + background-color: #fff !important; +} + +.scrubber:hover::-moz-range-thumb, +.volumeControl:hover::-moz-range-thumb { + background-color: #ccc !important; +} + +.scrubber:active::-moz-range-thumb, +.volumeControl:active::-moz-range-thumb { + background-color: #bbb !important; +} + +.controlBar { + border-radius: 5px; + margin: auto; + margin-bottom: 5px; + width: 98.5%; + max-width: 800px; + height: 30px !important; + background-color: rgba(20,20,20,0.8) !important; +} + +.controlBar > .button:enabled:hover { + fill: #ccc !important; +} + +.controlBar > .button:enabled:hover:active { + fill: #bbb !important; +} + +.scrubberStack { + margin: 0 10px; +} + +.playButton { + scale: 0.8; +} + + + +/** Vertical Volume Bar **/ +/* I'm to stupid to get this working. Wasn't able to set proper position relative to mute button */ + +/* .muteButton:hover ~ .volumeStack{ + margin-bottom: 129px !important; + } + .volumeStack:hover { + margin-bottom: 129px !important; + } + + .volumeStack { + transform: rotate(270deg); + max-height: 33px !important; + min-width: 100px !important; + position:absolute !important; + margin-bottom: -150px !important; + background-color: rgba(20,20,20,0.8) !important; + border-bottom-right-radius: 5px !important; + border-top-right-radius: 5px !important; + transition-property: margin-bottom; + transition-duration: 0.13s; + transition-timing-function: linear; + } + + .volumeControl{ + width: 92% !important; + margin-left: 5px !important; +} */ diff --git a/src/other/firefox/WhiteSur/theme.css b/src/other/firefox/WhiteSur/theme.css index 091f0194..ed471a76 100644 --- a/src/other/firefox/WhiteSur/theme.css +++ b/src/other/firefox/WhiteSur/theme.css @@ -13,12 +13,15 @@ @import "parts/remove-white-flash.css"; @import "parts/custom-icons.css"; @import "parts/icons.css"; +@import "parts/video-player.css"; @import "colors/light.css"; @import "colors/dark.css"; @namespace xul "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; /* Set theme version text in customization panel */ #customization-footer::before { + background: url(icons/icon.svg) no-repeat; + background-size: contain; content: "Firefox WhiteSur theme"; - padding: 10px; + padding: 10px 10px 10px 50px; } diff --git a/src/other/firefox/userContent-Monterey.css b/src/other/firefox/userContent-Monterey.css new file mode 100644 index 00000000..a66975c2 --- /dev/null +++ b/src/other/firefox/userContent-Monterey.css @@ -0,0 +1,5 @@ +@import "Monterey/colors/light.css"; +@import "Monterey/colors/dark.css"; + +@import "Monterey/pages/newtab.css"; +@import "Monterey/pages/privatebrowsing.css"; diff --git a/src/other/firefox/userContent-WhiteSur.css b/src/other/firefox/userContent-WhiteSur.css new file mode 100644 index 00000000..36d88313 --- /dev/null +++ b/src/other/firefox/userContent-WhiteSur.css @@ -0,0 +1,5 @@ +@import "WhiteSur/colors/light.css"; +@import "WhiteSur/colors/dark.css"; + +@import "WhiteSur/pages/newtab.css"; +@import "WhiteSur/pages/privatebrowsing.css";