Skip to content

Commit

Permalink
fix: Update to new customtitlebar attr in FF135
Browse files Browse the repository at this point in the history
Fixes #895
  • Loading branch information
rafaelmardojai committed Jan 15, 2025
1 parent 91ca1f8 commit 24daaf3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 22 deletions.
4 changes: 2 additions & 2 deletions theme/parts/csd.css
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
22 changes: 7 additions & 15 deletions theme/parts/icons.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand Down
10 changes: 5 additions & 5 deletions theme/parts/tabsbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 24daaf3

Please sign in to comment.