Restore GTK-informed widget styling for menupopups on linux

Firefox restyled Linux menupopups at some point to no longer conform to
the DE defined styles for GTK widgets. This removes that custom firefox
styling and uses DE defined values instead. This is especially apparent
on Linux Unity where menupopups are dark in both light and dark themes
by default for apps.
This commit is contained in:
Adomas Venčkauskas 2024-02-06 12:53:57 +02:00 committed by Dan Stillman
parent beb7b51cb3
commit 6dae7037e1
4 changed files with 22 additions and 7 deletions

13
scss/linux/_menu.scss Normal file
View file

@ -0,0 +1,13 @@
@each $cls, $icon in $menu-icons {
.zotero-menuitem-#{$cls} {
// If icon starts with "light-dark:", use light and dark icon
@if str-slice($icon, 0, 11) == "light-dark:" {
@include focus-states using ($color) {
@include svgicon-menu(str-slice($icon, 12), $color, "16");
}
}
@else {
@include svgicon-menu($icon, "universal", "16", false, false, false);
}
}
};

View file

@ -1,10 +1,7 @@
menupopup, panel, #search-mode-popup {
--panel-padding-block: 0;
--panel-border-radius: 6px;
--panel-background: var(--material-toolbar);
--menuitem-hover-background-color: var(--fill-quinary);
--menuitem-disabled-hover-background-color: var(--fill-quinary);
@include light-dark(--panel-border-color, #dddddd, #1c1c1c);
--panel-padding-block: initial;
--panel-border-color: initial;
--panel-border-radius: 3px;
}
menupopup {
@ -16,5 +13,5 @@ menupopup {
}
:is(panel, menupopup)::part(content) {
padding: 6px 0px 6px 0px;
padding: 3px 0;
}

View file

@ -15,6 +15,10 @@
-moz-appearance: -moz-window-titlebar;
}
#zotero-title-bar {
border-top: 1px solid var(--toolbar-field-border-color);
}
#toolbar-menubar {
pointer-events: none;
visibility: visible;

View file

@ -8,6 +8,7 @@
@import "linux/editable";
@import "linux/errorReport";
@import "linux/feedSettings";
@import "linux/menu";
@import "linux/menupopup";
@import "linux/tabBar";
@import "linux/titleBar";