From 718234ff18fab7f5b8d08371178a5048f4864f54 Mon Sep 17 00:00:00 2001 From: vinceliuice Date: Thu, 18 Jul 2024 20:38:54 +0800 Subject: [PATCH] Fixed #1088 --- src/other/firefox/Monterey/colors/dark.css | 1 + src/other/firefox/Monterey/colors/light.css | 1 + .../Monterey/parts/headerbar-urlbar.css | 24 +++++++++++++------ src/other/firefox/Monterey/parts/tabsbar.css | 4 ++++ src/other/firefox/WhiteSur/colors/dark.css | 1 + src/other/firefox/WhiteSur/colors/light.css | 1 + .../WhiteSur/parts/headerbar-urlbar.css | 4 ++++ .../firefox/common/icons/tool-profiler.svg | 5 ++++ src/other/firefox/common/parts/headerbar.css | 7 ++++++ src/other/firefox/common/parts/icons.css | 8 ++++++- 10 files changed, 48 insertions(+), 8 deletions(-) create mode 100644 src/other/firefox/common/icons/tool-profiler.svg diff --git a/src/other/firefox/Monterey/colors/dark.css b/src/other/firefox/Monterey/colors/dark.css index 809f8fad..e361caf2 100644 --- a/src/other/firefox/Monterey/colors/dark.css +++ b/src/other/firefox/Monterey/colors/dark.css @@ -80,6 +80,7 @@ --gnome-button-destructive-action-active-border-color: #851015; --gnome-button-destructive-action-active-box-shadow: inset 0 1px rgba(255, 255, 255, 0); + --gnome-headerbar-button-combined-background: rgba(255, 255, 255, 0.05); --gnome-headerbar-button-hover-background: rgba(255, 255, 255, 0.1); --gnome-headerbar-button-active-background: rgba(255, 255, 255, 0.15); diff --git a/src/other/firefox/Monterey/colors/light.css b/src/other/firefox/Monterey/colors/light.css index 081d66f7..fc1e0d8d 100644 --- a/src/other/firefox/Monterey/colors/light.css +++ b/src/other/firefox/Monterey/colors/light.css @@ -79,6 +79,7 @@ --gnome-button-destructive-action-active-border-color: #b2161d; --gnome-button-destructive-action-active-box-shadow: inset 0 1px rgba(255, 255, 255, 0); + --gnome-headerbar-button-combined-background: rgba(0, 0, 0, 0.05); --gnome-headerbar-button-hover-background: rgba(0, 0, 0, 0.1); --gnome-headerbar-button-active-background: rgba(0, 0, 0, 0.15); diff --git a/src/other/firefox/Monterey/parts/headerbar-urlbar.css b/src/other/firefox/Monterey/parts/headerbar-urlbar.css index 44e73a67..4f7e6451 100644 --- a/src/other/firefox/Monterey/parts/headerbar-urlbar.css +++ b/src/other/firefox/Monterey/parts/headerbar-urlbar.css @@ -2,20 +2,19 @@ @namespace xul "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; -#urlbar { - --urlbar-height: 32px !important; - --urlbar-container-height: 32px !important; - --urlbar-toolbar-height: 32px !important; - --urlbar-inner-padding: 0 !important; -} - toolbarspring { display: none !important; } /* URL bar */ #urlbar { + --urlbar-height: 32px !important; + --urlbar-container-height: 32px !important; + --urlbar-toolbar-height: 32px !important; + --urlbar-inner-padding: 0 !important; box-shadow: none !important; + width: 360px !important; + min-width: 360px !important; } #urlbar-background { @@ -153,6 +152,13 @@ toolbarspring { } /* URL bar and Search bar */ +#urlbar[focused], +#searchbar:focus-within { + outline: none !important; + border: none !important; + box-shadow: none !important; +} + #urlbar[focused] .urlbar-textbox-container { margin: -1px !important; } @@ -194,6 +200,10 @@ toolbarspring { border-radius: 5px !important; } +#identity-box[pageproxystate="valid"].chromeUI { + margin-left: 0 !important; +} + #identity-box:hover { background: var(--gnome-headerbar-button-hover-background) !important; } diff --git a/src/other/firefox/Monterey/parts/tabsbar.css b/src/other/firefox/Monterey/parts/tabsbar.css index 680ab82e..a0221a63 100644 --- a/src/other/firefox/Monterey/parts/tabsbar.css +++ b/src/other/firefox/Monterey/parts/tabsbar.css @@ -2,6 +2,10 @@ @namespace xul "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; +:root[tabsintitlebar] #nav-bar * { + -moz-window-dragging: drag; +} + tab > stack { margin: 0 3px !important; } diff --git a/src/other/firefox/WhiteSur/colors/dark.css b/src/other/firefox/WhiteSur/colors/dark.css index f174542d..6484d652 100644 --- a/src/other/firefox/WhiteSur/colors/dark.css +++ b/src/other/firefox/WhiteSur/colors/dark.css @@ -80,6 +80,7 @@ --gnome-button-destructive-action-active-border-color: #851015; --gnome-button-destructive-action-active-box-shadow: inset 0 1px rgba(255, 255, 255, 0); + --gnome-headerbar-button-combined-background: rgba(255, 255, 255, 0.05); --gnome-headerbar-button-hover-background: rgba(255, 255, 255, 0.1); --gnome-headerbar-button-active-background: rgba(255, 255, 255, 0.15); diff --git a/src/other/firefox/WhiteSur/colors/light.css b/src/other/firefox/WhiteSur/colors/light.css index 36a43d0d..2f342608 100644 --- a/src/other/firefox/WhiteSur/colors/light.css +++ b/src/other/firefox/WhiteSur/colors/light.css @@ -78,6 +78,7 @@ --gnome-button-destructive-action-active-border-color: #b2161d; --gnome-button-destructive-action-active-box-shadow: inset 0 1px rgba(255, 255, 255, 0); + --gnome-headerbar-button-combined-background: rgba(0, 0, 0, 0.05); --gnome-headerbar-button-hover-background: rgba(0, 0, 0, 0.1); --gnome-headerbar-button-active-background: rgba(0, 0, 0, 0.15); diff --git a/src/other/firefox/WhiteSur/parts/headerbar-urlbar.css b/src/other/firefox/WhiteSur/parts/headerbar-urlbar.css index 61d2c2ca..3f1834cb 100644 --- a/src/other/firefox/WhiteSur/parts/headerbar-urlbar.css +++ b/src/other/firefox/WhiteSur/parts/headerbar-urlbar.css @@ -212,6 +212,10 @@ toolbarspring { border-radius: 5px !important; } +#identity-box[pageproxystate="valid"].chromeUI { + margin-left: 0 !important; +} + #identity-box:hover { background: var(--gnome-headerbar-button-hover-background) !important; } diff --git a/src/other/firefox/common/icons/tool-profiler.svg b/src/other/firefox/common/icons/tool-profiler.svg new file mode 100644 index 00000000..1e2b8dc5 --- /dev/null +++ b/src/other/firefox/common/icons/tool-profiler.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/other/firefox/common/parts/headerbar.css b/src/other/firefox/common/parts/headerbar.css index dbb4d739..f4cc64b0 100644 --- a/src/other/firefox/common/parts/headerbar.css +++ b/src/other/firefox/common/parts/headerbar.css @@ -34,6 +34,13 @@ toolbar .toolbaritem-combined-buttons > .toolbarbutton-1 { } #nav-bar .toolbaritem-combined-buttons { + padding: 0 !important; + margin: 0 !important; + border-radius: 8px !important; + background: var(--gnome-headerbar-button-combined-background) !important; +} + +#nav-bar .toolbaritem-combined-buttons toolbarbutton:not(#urlbar-zoom-button) { margin: 0 !important; } diff --git a/src/other/firefox/common/parts/icons.css b/src/other/firefox/common/parts/icons.css index 98773d58..bcdbbab9 100644 --- a/src/other/firefox/common/parts/icons.css +++ b/src/other/firefox/common/parts/icons.css @@ -609,6 +609,11 @@ toolbar:not([brighttext]) .webextension-browser-action:-moz-lwtheme { fill: currentColor; } +/* profiler */ +#profiler-button-button > .toolbarbutton-icon { + list-style-image: url("../icons/tool-profiler.svg") !important; +} + /* Fix flat buttons icons aproach */ button.close::before { content: ""; @@ -772,7 +777,8 @@ treechildren::-moz-tree-image { .menu-iconic.bookmark-item[container] .menu-iconic-icon, .panel-info-button > image, #password-notification-icon, - #firefox-view-button .toolbarbutton-icon { + #firefox-view-button .toolbarbutton-icon, + #profiler-button-button > .toolbarbutton-icon { filter: invert(60%) brightness(150%); }