From 3753da35a279b3f1aed076afa9f67f202c0e67fc Mon Sep 17 00:00:00 2001 From: vinceliuice Date: Thu, 3 Jul 2025 20:02:54 +0800 Subject: [PATCH] Fixed issues --- install.sh | 18 ++---- libs/lib-install.sh | 19 ++++++ .../WhiteSur/parts/headerbar-urlbar.css | 58 +++++++++++++++++++ .../firefox/common/parts/buttons-fixes.css | 2 +- src/other/firefox/common/parts/controls.css | 5 +- src/other/firefox/common/parts/headerbar.css | 18 +++--- src/other/firefox/common/parts/popups.css | 10 ++++ src/sass/gtk/_common-3.0.scss | 26 +++------ 8 files changed, 113 insertions(+), 43 deletions(-) diff --git a/install.sh b/install.sh index a40bbdcd..70c32dd3 100755 --- a/install.sh +++ b/install.sh @@ -169,17 +169,9 @@ if [[ "${uninstall}" == 'true' ]]; then prompt -e "Find installed GDM theme, you need to run: 'sudo ./tweaks.sh -g -r' to remove it!" fi else - if [[ "${interactive}" == 'true' ]]; then - show_panel_opacity_dialog -# show_sidebar_size_dialog - show_nautilus_style_dialog -# else -# show_needed_dialogs - fi + #prompt -w "Removing the old '${name}' themes...\n" - prompt -w "Removing the old '${name}' themes...\n" - - remove_themes; customize_theme; avoid_variant_duplicates; + clean_themes; customize_theme; avoid_variant_duplicates; prompt -w "Installing '${name}' themes in '${dest}'...\n"; @@ -192,17 +184,17 @@ else prompt -i "Start icon style : ${icon}" prompt -i "Nautilus style : ${nautilus_style}" - echo; install_themes; echo; prompt -s "Done!" - if [[ "${libadwaita}" == 'true' ]]; then if [[ "$UID" != '0' ]]; then - install_libadwaita + install_libadwaita && reset_gtk_base echo; prompt -w "Some colorsheme extension will re-writes config files in '${HOME}/.config/gtk-4.0' like: 'custom-accent-colors' you need to disable it!" else echo; prompt -e "Do not run '--libadwaita' option with sudo!" fi fi + echo; install_themes; echo; prompt -s "Done!" + if (is_my_distro "solus") && (is_running "gnome-session"); then msg="GNOME: you may need to disable 'User Themes' extension to fix your dock." fi diff --git a/libs/lib-install.sh b/libs/lib-install.sh index afab69f5..fabfc872 100755 --- a/libs/lib-install.sh +++ b/libs/lib-install.sh @@ -537,6 +537,11 @@ config_gtk4() { prompt -s "\n Installed ${name}${color}${opacity}${alt}${theme}${scheme} gtk-4.0 theme in '${HOME}/.config/gtk-4.0' for libadwaita!" } +reset_gtk_base() { + libadwaita='true' + accent_type='fixed' +} + install_libadwaita() { color="${colors[0]}" opacity="${opacities[0]}" @@ -592,6 +597,20 @@ install_themes() { stop_animation; fix_whiskermenu } +clean_themes() { + for color in "${colors[@]}"; do + for opacity in "${opacities[@]}"; do + for alt in "${alts[@]}"; do + for theme in "${themes[@]}"; do + for scheme in "${schemes[@]}"; do + remove_packy "${color}" "${opacity}" "${alt}" "${theme}" "${scheme}" + done + done + done + done + done +} + remove_themes() { process_ids=() diff --git a/src/other/firefox/WhiteSur/parts/headerbar-urlbar.css b/src/other/firefox/WhiteSur/parts/headerbar-urlbar.css index ec994e19..5ed7d090 100644 --- a/src/other/firefox/WhiteSur/parts/headerbar-urlbar.css +++ b/src/other/firefox/WhiteSur/parts/headerbar-urlbar.css @@ -209,6 +209,64 @@ toolbarspring { border-radius: 5px !important; } +#nav-bar #urlbar toolbarbutton#urlbar-searchmode-switcher:not(#urlbar-zoom-button):not(.subviewbutton):not(.titlebar-button):not(.close-button) { + appearance: none; + border-radius: 8px !important; + margin-left: -3px !important; + margin-inline-end: var(--urlbar-searchmodeswitcher-margin-inline-end); + padding-inline: var(--urlbar-searchmodeswitcher-inline-padding); + + &.close-button { + margin-left: 6px !important; + } + + &:focus-visible { + outline: var(--focus-outline); + outline-offset: var(--focus-outline-inset); + } + + &[open] { + background-color: var(--urlbar-box-focus-bgcolor) !important; + } + + /* No need space if page information icons such as lock and shield is shown */ + #urlbar[pageproxystate=valid] & { + margin-inline-end: 0; + } + + #urlbar[searchmode] & { + background-color: var(--urlbar-box-bgcolor) !important; + margin-inline-end: 0 !important; + border-start-end-radius: 0 !important; + border-end-end-radius: 0 !important; + } + + /* The background rule should match to #searchmode-switcher-chicklet */ + #urlbar[focused] & { + background-color: var(--urlbar-box-focus-bgcolor) !important; + } + + /* stylelint-disable media-query-no-invalid */ + @media (not -moz-pref("browser.urlbar.searchModeSwitcher.featureGate")) and + (not -moz-pref("browser.urlbar.scotchBonnet.enableOverride")) { + display: none; + } +} + +#searchmode-switcher-chicklet { + background-color: var(--urlbar-box-bgcolor); + border-start-end-radius: 8px !important; + border-end-end-radius: 8px !important; + align-items: center; + height: 100%; + margin-inline-end: var(--urlbar-searchmodeswitcher-margin-inline-end); + display: none; +} + +#urlbar-search-mode-indicator-close, #searchmode-switcher-close { + margin-left: 6px !important; +} + .urlbar-page-action { padding: 5px 6px !important; } diff --git a/src/other/firefox/common/parts/buttons-fixes.css b/src/other/firefox/common/parts/buttons-fixes.css index 9b0a9fab..66281dcc 100644 --- a/src/other/firefox/common/parts/buttons-fixes.css +++ b/src/other/firefox/common/parts/buttons-fixes.css @@ -2,7 +2,7 @@ @namespace xul "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; /* Fix hover background */ -.toolbarbutton-badge-stack:not(#hack), .toolbarbutton-icon:not(#hack), .toolbarbutton-text:not(#hack) { +.toolbarbutton-badge-stack:not(#hack), .toolbarbutton-icon:not(#hack):not(.close-button), .toolbarbutton-text:not(#hack) { background: transparent !important; } diff --git a/src/other/firefox/common/parts/controls.css b/src/other/firefox/common/parts/controls.css index cb9c39e9..6f2e001d 100644 --- a/src/other/firefox/common/parts/controls.css +++ b/src/other/firefox/common/parts/controls.css @@ -6,7 +6,7 @@ /* Switchers */ .toggle-button { --toggle-height: 26px !important; - --toggle-width: 48px !important; + --toggle-width: 42px !important; --toggle-border-radius: 24px !important; --toggle-border-color: var(--gnome-switch-border-color) !important; --toggle-background-color: var(--gnome-switch-background) !important; @@ -16,9 +16,10 @@ --toggle-background-color-pressed-hover: var(--gnome-switch-pressed-hover-background) !important; --toggle-background-color-pressed-active: var(--gnome-switch-pressed-active-background) !important; --toggle-dot-height: 22px !important; + --toggle-dot-width: 22px !important; --toggle-dot-background-color: #ffffff !important; --toggle-dot-background-color-on-pressed: #ffffff !important; - --toggle-dot-margin: 1px !important/* border: 0 !important;*/ + --toggle-dot-margin: 1px !important; } .toggle-button:enabled:hover { diff --git a/src/other/firefox/common/parts/headerbar.css b/src/other/firefox/common/parts/headerbar.css index dee9dd20..0d818a6f 100644 --- a/src/other/firefox/common/parts/headerbar.css +++ b/src/other/firefox/common/parts/headerbar.css @@ -12,7 +12,7 @@ } /* Headerbar buttons */ -#nav-bar toolbarbutton:not(#urlbar-zoom-button):not(.subviewbutton):not(.titlebar-button), +#nav-bar toolbarbutton:not(#urlbar-zoom-button):not(.subviewbutton):not(.titlebar-button):not(.close-button), toolbar .toolbaritem-combined-buttons > .toolbarbutton-1 { border: none !important; box-shadow: none !important; @@ -27,7 +27,7 @@ toolbar .toolbaritem-combined-buttons > .toolbarbutton-1 { transition: background 200ms; } -:root:-moz-window-inactive #nav-bar toolbarbutton:not(#urlbar-zoom-button):not(.titlebar-button) { +:root:-moz-window-inactive #nav-bar toolbarbutton:not(#urlbar-zoom-button):not(.titlebar-button):not(.close-button) { background: none !important; } @@ -43,7 +43,7 @@ toolbar .toolbaritem-combined-buttons > .toolbarbutton-1 { } /* Hover headerbar buttons */ -#nav-bar toolbarbutton:not(#urlbar-zoom-button):not(.titlebar-button):not([open]):not([disabled]):not([checked]):hover, +#nav-bar toolbarbutton:not(#urlbar-zoom-button):not(.titlebar-button):not(.close-button):not([open]):not([disabled]):not([checked]):hover, #TabsToolbar .toolbarbutton-1:hover, #tabs-newtab-button:hover, #TabsToolbar #new-tab-button:hover { outline: 0 !important; @@ -51,28 +51,28 @@ toolbar .toolbaritem-combined-buttons > .toolbarbutton-1 { } /* Active headerbar buttons */ -#nav-bar toolbarbutton:not(#urlbar-zoom-button):not(.titlebar-button):not([disabled]):not(#hack):active, -#nav-bar toolbarbutton:not(#urlbar-zoom-button):not(.titlebar-button):not([disabled])[open], -#nav-bar toolbarbutton:not(#urlbar-zoom-button):not(.titlebar-button):not([disabled])[checked], +#nav-bar toolbarbutton:not(#urlbar-zoom-button):not(.titlebar-button):not(.close-button):not([disabled]):not(#hack):active, +#nav-bar toolbarbutton:not(#urlbar-zoom-button):not(.titlebar-button):not(.close-button):not([disabled])[open], +#nav-bar toolbarbutton:not(#urlbar-zoom-button):not(.titlebar-button):not(.close-button):not([disabled])[checked], #TabsToolbar .toolbarbutton-1:active, #TabsToolbar .toolbarbutton-1[open], #tabs-newtab-button:active, #TabsToolbar #new-tab-button:active { background: var(--gnome-headerbar-button-active-background) !important; } /* Disabled headerbar buttons */ -#nav-bar toolbarbutton:not(#urlbar-zoom-button):not(.titlebar-button)[disabled] { +#nav-bar toolbarbutton:not(#urlbar-zoom-button):not(.titlebar-button):not(.close-button)[disabled] { background: transparent !important; border-color: var(--gnome-button-disabled-border-color) !important; box-shadow: none !important; opacity: 1 !important; } -#nav-bar toolbarbutton:not(#urlbar-zoom-button):not(.titlebar-button)[disabled] image { +#nav-bar toolbarbutton:not(#urlbar-zoom-button):not(.titlebar-button):not(.close-button)[disabled] image { opacity: .4 !important; } /* Inactive window buttons */ -#nav-bar toolbarbutton:not(#urlbar-zoom-button):not(.titlebar-button):-moz-window-inactive { +#nav-bar toolbarbutton:not(#urlbar-zoom-button):not(.titlebar-button):not(.close-button):-moz-window-inactive { background: var(--gnome-inactive-button-background) !important; box-shadow: var(--gnome-inactive-button-box-shadow) !important; border-color: var(--gnome-inactive-button-border-color) !important; diff --git a/src/other/firefox/common/parts/popups.css b/src/other/firefox/common/parts/popups.css index 4144ad42..8217a7d1 100644 --- a/src/other/firefox/common/parts/popups.css +++ b/src/other/firefox/common/parts/popups.css @@ -58,6 +58,16 @@ menuitem, menupopup menu { box-shadow: none !important; } +/* checkbox / radio rendering */ + +@media (-moz-platform: linux) { + menuitem[type="radio"] .menu-icon, + menuitem:is([type="checkbox"], [checked="true"]) .menu-icon { + appearance: none !important; + -moz-default-appearance: none !important; + } +} + menuitem[type="checkbox"] image, menuitem[type="radio"] image { visibility: visible !important; diff --git a/src/sass/gtk/_common-3.0.scss b/src/sass/gtk/_common-3.0.scss index ed5e7007..5f297a88 100644 --- a/src/sass/gtk/_common-3.0.scss +++ b/src/sass/gtk/_common-3.0.scss @@ -1694,7 +1694,7 @@ headerbar { margin-bottom: 0; min-height: 0; min-width: 120px; - padding: 0 0; + padding: 0; background-color: transparent; > stack > box { @@ -1956,10 +1956,12 @@ $pathbar_button_checked_bg: if($variant == 'light', #808080, #b8b8b8); .path-bar button { min-width: $container_padding * 2; min-height: if($variant == 'light', 24px, 26px); + padding-left: $container_padding; + padding-right: $container_padding; - &.text-button, &.image-button, & { - padding-left: $container_padding; - padding-right: $container_padding; + label, image { + padding-left: $container_padding / 2; + padding-right: $container_padding / 2; } &:hover { box-shadow: none; } @@ -1974,22 +1976,10 @@ $pathbar_button_checked_bg: if($variant == 'light', #808080, #b8b8b8); border-color: $button_borders; } - &.text-button.image-button label { padding-left: 0; padding-right: 0; } - - &.text-button.image-button, & { - label:last-child { padding-right: $container_padding; } - label:first-child { padding-left: $container_padding; } - } - &.slider-button, &:not(.image-button):not(.text-button) { - padding-left: 1px; - padding-right: 1px; - } - - &.image-button image { - padding-left: $container_padding; - padding-right: $container_padding; + padding-left: $container_padding / 2; + padding-right: $container_padding / 2; } }