From 5c9a82d063524e9ac2b51b5d92d427fd1c810697 Mon Sep 17 00:00:00 2001 From: vinceliuice Date: Tue, 3 Sep 2024 11:26:46 +0800 Subject: [PATCH] update --- shell/lib-install.sh | 26 ++++++++------ .../firefox/Monterey/left_header_button_3.css | 4 +-- .../firefox/Monterey/left_header_button_4.css | 4 +-- .../firefox/Monterey/left_header_button_5.css | 4 +-- .../Monterey/parts/headerbar-urlbar.css | 34 +++++++++---------- src/other/firefox/Monterey/parts/tabsbar.css | 5 +++ .../WhiteSur/parts/headerbar-urlbar.css | 2 +- src/other/firefox/common/parts/headerbar.css | 4 --- 8 files changed, 44 insertions(+), 39 deletions(-) diff --git a/shell/lib-install.sh b/shell/lib-install.sh index 799e8540..b0139a5a 100755 --- a/shell/lib-install.sh +++ b/shell/lib-install.sh @@ -742,17 +742,21 @@ config_firefox() { killall "firefox" "firefox-bin" &> /dev/null || true for d in "${FIREFOX_DIR}/"*"default"*; do - if [[ -f "${d}/prefs.js" ]]; then - rm -rf "${d}/chrome" - udo ln -sf "${TARGET_DIR}" "${d}/chrome" - udoify_file "${d}/prefs.js" - echo "user_pref(\"toolkit.legacyUserProfileCustomizations.stylesheets\", true);" >> "${d}/prefs.js" - echo "user_pref(\"browser.tabs.drawInTitlebar\", true);" >> "${d}/prefs.js" - echo "user_pref(\"browser.uidensity\", 0);" >> "${d}/prefs.js" - echo "user_pref(\"layers.acceleration.force-enabled\", true);" >> "${d}/prefs.js" - echo "user_pref(\"mozilla.widget.use-argb-visuals\", true);" >> "${d}/prefs.js" - echo "user_pref(\"widget.gtk.rounded-bottom-corners.enabled\", true);" >> "${d}/prefs.js" - fi + rm -rf "${d}/chrome" + udo ln -sf "${TARGET_DIR}" "${d}/chrome" + rm -rf "${d}/user.js" + udoify_file "${d}/user.js" + # Enable customChrome.css + echo "user_pref(\"toolkit.legacyUserProfileCustomizations.stylesheets\", true);" >> "${d}/user.js" + echo "user_pref(\"browser.tabs.drawInTitlebar\", true);" >> "${d}/user.js" + # Set UI density to normal + echo "user_pref(\"browser.uidensity\", 0);" >> "${d}/user.js" + echo "user_pref(\"layers.acceleration.force-enabled\", true);" >> "${d}/user.js" + echo "user_pref(\"mozilla.widget.use-argb-visuals\", true);" >> "${d}/user.js" + # Enable rounded bottom window corners + echo "user_pref(\"widget.gtk.rounded-bottom-corners.enabled\", true);" >> "${d}/user.js" + # Enable SVG context-propertes + echo "user_pref(\"svg.context-properties.content.enabled\", true);" >> "${d}/user.js" done } diff --git a/src/other/firefox/Monterey/left_header_button_3.css b/src/other/firefox/Monterey/left_header_button_3.css index e0cc6cc5..ccd90087 100644 --- a/src/other/firefox/Monterey/left_header_button_3.css +++ b/src/other/firefox/Monterey/left_header_button_3.css @@ -1,10 +1,10 @@ #TabsToolbar { - margin-left: 491px !important; + margin-left: 510px !important; } /* Left window titlebuttons mode */ @media (-moz-gtk-csd-reversed-placement) { #TabsToolbar { - margin-left: 534px !important; + margin-left: 590px !important; } } diff --git a/src/other/firefox/Monterey/left_header_button_4.css b/src/other/firefox/Monterey/left_header_button_4.css index 042decff..11df3c1a 100644 --- a/src/other/firefox/Monterey/left_header_button_4.css +++ b/src/other/firefox/Monterey/left_header_button_4.css @@ -1,10 +1,10 @@ #TabsToolbar { - margin-left: 531px !important; + margin-left: 552px !important; } /* Left window titlebuttons mode */ @media (-moz-gtk-csd-reversed-placement) { #TabsToolbar { - margin-left: 574px !important; + margin-left: 632px !important; } } diff --git a/src/other/firefox/Monterey/left_header_button_5.css b/src/other/firefox/Monterey/left_header_button_5.css index 5f19f597..9364975c 100644 --- a/src/other/firefox/Monterey/left_header_button_5.css +++ b/src/other/firefox/Monterey/left_header_button_5.css @@ -1,10 +1,10 @@ #TabsToolbar { - margin-left: 571px !important; + margin-left: 596px !important; } /* Left window titlebuttons mode */ @media (-moz-gtk-csd-reversed-placement) { #TabsToolbar { - margin-left: 614px !important; + margin-left: 686px !important; } } diff --git a/src/other/firefox/Monterey/parts/headerbar-urlbar.css b/src/other/firefox/Monterey/parts/headerbar-urlbar.css index 055d6172..e57379b4 100644 --- a/src/other/firefox/Monterey/parts/headerbar-urlbar.css +++ b/src/other/firefox/Monterey/parts/headerbar-urlbar.css @@ -17,23 +17,6 @@ toolbarspring { min-width: 360px !important; } -#urlbar[breakout][breakout-extend] { - left: 0 !important; - top: 0 !important; - width: 100% !important; - z-index: 5 !important; - padding: 0 !important; - border-radius: 8px !important; - outline: 2px solid var(--gnome-focused-urlbar-border-color) !important; - outline-offset: -2px; - -moz-outline-radius: 8px; - transition: outline 100ms ease-out; -} - -#urlbar:-moz-window-inactive { - border-color: var(--gnome-inactive-headerbar-background) !important; -} - #urlbar[focused="true"]:not([suppress-focus-border]) > #urlbar-background { outline-color: transparent !important; } @@ -54,6 +37,13 @@ toolbarspring { min-width: 360px !important; } +#urlbar-background { + box-shadow: none !important; + border: none !important; + background: none !important; + border-radius: 8px !important; +} + #urlbar[breakout][breakout-extend] { left: 0 !important; top: 0 !important; @@ -61,11 +51,17 @@ toolbarspring { z-index: 5 !important; padding: 0 !important; border-radius: 8px !important; + outline: 2px solid var(--gnome-focused-urlbar-border-color) !important; + outline-offset: -2px; + -moz-outline-radius: 8px; + transition: outline 100ms ease-out; } + #urlbar[breakout][breakout-extend][open] { height: auto !important; max-height: unset !important; } + #urlbar[breakout][breakout-extend] #urlbar-input-container, #urlbar[breakout][breakout-extend] .urlbar-input-container { height: 32px !important; @@ -73,6 +69,10 @@ toolbarspring { padding: 0 !important; } +#urlbar:-moz-window-inactive { + border-color: var(--gnome-inactive-headerbar-background) !important; +} + #urlbar-input { text-align: center !important; padding: 0 28px 0 0 !important; diff --git a/src/other/firefox/Monterey/parts/tabsbar.css b/src/other/firefox/Monterey/parts/tabsbar.css index a1e87c3b..9e4fbf13 100644 --- a/src/other/firefox/Monterey/parts/tabsbar.css +++ b/src/other/firefox/Monterey/parts/tabsbar.css @@ -2,6 +2,11 @@ @namespace xul "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; +:root[tabsintitlebar] #nav-bar toolbaritem, +#nav-bar-customization-target { + -moz-window-dragging: drag; +} + tab > stack { margin: 0 3px !important; } diff --git a/src/other/firefox/WhiteSur/parts/headerbar-urlbar.css b/src/other/firefox/WhiteSur/parts/headerbar-urlbar.css index 406f5764..de2b5181 100644 --- a/src/other/firefox/WhiteSur/parts/headerbar-urlbar.css +++ b/src/other/firefox/WhiteSur/parts/headerbar-urlbar.css @@ -98,7 +98,7 @@ toolbarspring { border: 0 !important; } -.urlbarView-row-inner, .urlbarView-no-wrap { +.urlbarView-row-inner, .urlbarView-no-wrap { align-items: center !important; } diff --git a/src/other/firefox/common/parts/headerbar.css b/src/other/firefox/common/parts/headerbar.css index 27397c5c..90c32e37 100644 --- a/src/other/firefox/common/parts/headerbar.css +++ b/src/other/firefox/common/parts/headerbar.css @@ -6,10 +6,6 @@ padding: 8px !important; } -#nav-bar-customization-target { - -moz-window-dragging: drag; -} - /* Headerbar CSD colors */ :root[tabsintitlebar] #nav-bar { border: none !important;