From 24daaf3de2f1bc7e0949e0b63ce62edaf95981e3 Mon Sep 17 00:00:00 2001 From: Rafael Mardojai CM Date: Tue, 14 Jan 2025 12:27:22 -0500 Subject: [PATCH] fix: Update to new `customtitlebar` attr in FF135 Fixes #895 --- theme/parts/csd.css | 4 ++-- theme/parts/icons.css | 22 +++++++--------------- theme/parts/tabsbar.css | 10 +++++----- 3 files changed, 14 insertions(+), 22 deletions(-) diff --git a/theme/parts/csd.css b/theme/parts/csd.css index 634ddcc0..8afdb988 100644 --- a/theme/parts/csd.css +++ b/theme/parts/csd.css @@ -1,8 +1,8 @@ -/* GNOME CSD styles for headerbar on Firefox [tabsintitlebar] */ +/* GNOME CSD styles for headerbar on Firefox */ @namespace xul url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); -:root[tabsintitlebar] { +:root[customtitlebar] { /* Headerbar top border corners rounded */ &[sizemode="normal"]:not([gtktiledwindow="true"]) #nav-bar { border-radius: env(-moz-gtk-csd-titlebar-radius, 8px) env(-moz-gtk-csd-titlebar-radius, 8px) 0 0 !important; diff --git a/theme/parts/icons.css b/theme/parts/icons.css index e4db83e6..833aae94 100644 --- a/theme/parts/icons.css +++ b/theme/parts/icons.css @@ -49,22 +49,14 @@ button.close::before, .urlbarView-type-icon, radio > .radio-check, link[href="chrome://global/skin/dropmarker.css"] + image, -:root[tabsintitlebar] #titlebar .titlebar-buttonbox .titlebar-close .toolbarbutton-icon, -:root[tabsintitlebar] #titlebar .titlebar-buttonbox .titlebar-max .toolbarbutton-icon, -:root[tabsintitlebar] #titlebar .titlebar-buttonbox .titlebar-restore .toolbarbutton-icon, -:root[tabsintitlebar] #titlebar .titlebar-buttonbox .titlebar-min .toolbarbutton-icon, -:root[tabsintitlebar][inFullscreen] #window-controls #restore-button .toolbarbutton-icon { +:root[customtitlebar] .titlebar-buttonbox .titlebar-button .toolbarbutton-icon { fill: var(--gnome-toolbar-icon-fill) !important; -moz-context-properties: fill; } .urlbar-icon:-moz-window-inactive, #urlbar:-moz-window-inactive image, .toolbarbutton-icon:-moz-window-inactive, -:root[tabsintitlebar] #titlebar .titlebar-buttonbox .titlebar-close:-moz-window-inactive .toolbarbutton-icon, -:root[tabsintitlebar] #titlebar .titlebar-buttonbox .titlebar-max .toolbarbutton-icon:-moz-window-inactive, -:root[tabsintitlebar] #titlebar .titlebar-buttonbox .titlebar-restore .toolbarbutton-icon:-moz-window-inactive, -:root[tabsintitlebar] #titlebar .titlebar-buttonbox .titlebar-min .toolbarbutton-icon:-moz-window-inactive, -:root[tabsintitlebar][inFullscreen] #window-controls #restore-button .toolbarbutton-icon { +:root[customtitlebar] .titlebar-buttonbox .titlebar-button .toolbarbutton-icon:-moz-window-inactive { opacity: 0.5 !important; } @@ -300,19 +292,19 @@ button.close::before { } /* Window buttons */ - :root[tabsintitlebar] .titlebar-buttonbox .titlebar-close .toolbarbutton-icon { + :root[customtitlebar] .titlebar-buttonbox .titlebar-close .toolbarbutton-icon { list-style-image: url("../icons/window-close-symbolic.svg") !important; } - :root[tabsintitlebar] .titlebar-buttonbox .titlebar-max .toolbarbutton-icon { + :root[customtitlebar] .titlebar-buttonbox .titlebar-max .toolbarbutton-icon { list-style-image: url("../icons/window-maximize-symbolic.svg") !important; } - :root[tabsintitlebar] .titlebar-buttonbox .titlebar-restore .toolbarbutton-icon { + :root[customtitlebar] .titlebar-buttonbox .titlebar-restore .toolbarbutton-icon { list-style-image: url("../icons/window-restore-symbolic.svg") !important; } - :root[tabsintitlebar][inFullscreen] .titlebar-buttonbox .titlebar-restore .toolbarbutton-icon { + :root[customtitlebar][inFullscreen] .titlebar-buttonbox .titlebar-restore .toolbarbutton-icon { list-style-image: url("../icons/view-restore-symbolic.svg") !important; } - :root[tabsintitlebar] .titlebar-buttonbox .titlebar-min .toolbarbutton-icon { + :root[customtitlebar] .titlebar-buttonbox .titlebar-min .toolbarbutton-icon { list-style-image: url("../icons/window-minimize-symbolic.svg") !important; } diff --git a/theme/parts/tabsbar.css b/theme/parts/tabsbar.css index ca780974..f5f11d60 100644 --- a/theme/parts/tabsbar.css +++ b/theme/parts/tabsbar.css @@ -638,25 +638,25 @@ tabs#tabbrowser-tabs { } /* Remove nav-bar rounding and padding */ - :root[tabsintitlebar][sizemode="normal"]:not([gtktiledwindow="true"]) #nav-bar { + :root[customtitlebar][sizemode="normal"]:not([gtktiledwindow="true"]) #nav-bar { border-radius: 0 !important; } /* Round and pad tab-bar */ - :root[tabsintitlebar][sizemode="normal"]:not([gtktiledwindow="true"]) #TabsToolbar { + :root[customtitlebar][sizemode="normal"]:not([gtktiledwindow="true"]) #TabsToolbar { border-radius: env(-moz-gtk-csd-titlebar-radius) env(-moz-gtk-csd-titlebar-radius) 0 0 !important } - :root[tabsintitlebar]:not([inFullscreen], [sizemode="maximized"]) #TabsToolbar .toolbar-items { + :root[customtitlebar]:not([inFullscreen], [sizemode="maximized"]) #TabsToolbar .toolbar-items { padding: 0 46px; } /* Hide duplicate window controls from navbar */ - :root[tabsintitlebar] #nav-bar .titlebar-buttonbox-container { + :root[customtitlebar] #nav-bar .titlebar-buttonbox-container { display: none !important; } /* Force displaying controls in tab-bar */ - :root[tabsintitlebar]:not([inDOMFullscreen]) #TabsToolbar .titlebar-buttonbox-container { + :root[customtitlebar]:not([inDOMFullscreen]) #TabsToolbar .titlebar-buttonbox-container { display: flex !important; padding-top: 6px !important; visibility: visible !important;