Adjust the titlebar/menubar xml and styling.

Reasoning:
- Different Linux DEs specify different titlebar button (min, max,
close) locations which we did not and could not support before.
- Previous approach copied from Firefox depended on custom offsets
specified in CSS instead of allowing the browser engine to place
elements

Changes:
- Titlebar and menubar no longer collapsed into each other with a
negative margin, instead just a single flexbox (on macOS the titlebar
is still collapsed into the tab bar)
- Support for -moz-gtk-csd-reversed-placement to correctly place the
titlebar buttons on Linux
- Removed/changed some code copied from Firefox that does not apply or
uses the wrong selectors
- Fixed the display of Linux Unity DE buttons with icons appearing outside
of button borders
- Removed the Z in the titlebar on Linux since only a few DEs use that.
- Aligned the tabbar on Linux and Windows to the left margin of the
window.
This commit is contained in:
Adomas Venčkauskas 2024-02-14 13:21:31 +02:00 committed by Dan Stillman
parent 34b389d118
commit beb7b51cb3
10 changed files with 104 additions and 183 deletions

View file

@ -58,24 +58,6 @@
}
#titlebar {
margin-bottom: calc(0px - var(--tab-min-height));
-moz-box-pack: center;
}
.titlebar-buttonbox-container {
-moz-box-ordinal-group: 1000;
}
/* ::::: Tabs in Titlebar :::::: */
&:not([chromemargin]) > #titlebar {
@ -90,10 +72,6 @@
min-height: calc(var(--tab-min-height) + var(--space-above-tabbar));
}
&[tabsintitlebar="true"]:not(:-moz-lwtheme) > #titlebar {
-moz-appearance: -moz-window-titlebar;
}
&:not([tabsintitlebar]) .titlebar-placeholder {
visibility: collapse;
}
@ -110,15 +88,6 @@
.titlebar-buttonbox {
-moz-appearance: -moz-window-button-box;
}
/* Fullscreen and caption buttons don't move with RTL on OS X so override the automatic ordering. */
.titlebar-buttonbox-container:-moz-locale-dir(rtl) {
-moz-box-ordinal-group: 1000;
}
.titlebar-buttonbox-container:-moz-locale-dir(ltr) {
-moz-box-ordinal-group: 0;
}
.titlebar-icon {
display: none;
@ -131,7 +100,10 @@
display: none;
}
#navigator-toolbox {
#titlebar {
display: flex;
align-items: center;
-moz-window-dragging: drag;
menu {
font-size: var(--zotero-font-size);
}