Skip to content

Commit

Permalink
Bug 1884452 - Allow users to disable non-native titlebar buttons on L…
Browse files Browse the repository at this point in the history
…inux. r=dao,stransky,desktop-theme-reviewers

If we wanted to provide this, it's not super-hard... But not sure if
worth it.

Differential Revision: https://phabricator.services.mozilla.com/D204246
  • Loading branch information
emilio committed Mar 12, 2024
1 parent 13e8a0d commit 04ffe8f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 15 deletions.
33 changes: 18 additions & 15 deletions browser/themes/linux/browser.css
Original file line number Diff line number Diff line change
Expand Up @@ -233,21 +233,24 @@
appearance: auto;
}

/* When using lightweight themes, use our own buttons since native ones might
* assume a native background in order to be visible. */
&:-moz-lwtheme {
padding-inline: 3px;

> .toolbarbutton-icon {
appearance: none;
border-radius: 100%;
background-position: center center;
background-repeat: no-repeat;
-moz-context-properties: stroke;
stroke: currentColor;
/* Roughly the Adwaita size */
width: 24px;
height: 24px;
/* stylelint-disable-next-line media-query-no-invalid */
@media (-moz-bool-pref: "widget.gtk.non-native-titlebar-buttons.enabled") {
/* When using lightweight themes, use our own buttons since native ones might
* assume a native background in order to be visible. */
&:-moz-lwtheme {
padding-inline: 3px;

> .toolbarbutton-icon {
appearance: none;
border-radius: 100%;
background-position: center center;
background-repeat: no-repeat;
-moz-context-properties: stroke;
stroke: currentColor;
/* Roughly the Adwaita size */
width: 24px;
height: 24px;
}
}
}

Expand Down
6 changes: 6 additions & 0 deletions modules/libpref/init/StaticPrefList.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16037,6 +16037,12 @@
mirror: always
rust: true

# Whether non-native titlebar buttons are enabled for lightweight themes.
- name: widget.gtk.non-native-titlebar-buttons.enabled
type: RelaxedAtomicBool
value: true
mirror: always

# Whether selection colors for the non-system theme get passed from the system
# GTK theme.
- name: widget.gtk.alt-theme.selection
Expand Down

0 comments on commit 04ffe8f

Please sign in to comment.