Refactor window button handling for consistency and update z-index in compact mode styles

This commit is contained in:
mr. M
2024-11-28 01:43:52 +01:00
parent 735f392663
commit 99b2babad4
3 changed files with 7 additions and 11 deletions

View File

@@ -188,16 +188,7 @@ var gZenVerticalTabsManager = {
get actualWindowButtons() {
// we have multiple ".titlebar-buttonbox-container" in the DOM, because of the titlebar
if (!this.__actualWindowButtons) {
if (window.AppConstants.platform !== 'macosx') {
this.__actualWindowButtons = document.querySelector('#nav-bar .titlebar-buttonbox-container');
} else {
const buttons = document.querySelectorAll('.titlebar-buttonbox-container');
if (buttons.length === 2) {
this.__actualWindowButtons = buttons[1];
} else {
this.__actualWindowButtons = buttons[0];
}
}
this.__actualWindowButtons = document.querySelector('#nav-bar .titlebar-buttonbox-container');
}
return this.__actualWindowButtons;
},

View File

@@ -23,7 +23,7 @@
--zen-toolbox-max-width: 54px !important;
--zen-compact-float: calc(var(--zen-element-separation) - 1px);
position: absolute;
z-index: 9;
z-index: 10;
transition: transform 0.2s ease-in-out, opacity 0.2s ease-in-out;
right: calc(100% - var(--zen-element-separation));
top: 0;

View File

@@ -30,6 +30,11 @@
width: fit-content;
}
:root[zen-window-buttons-reversed='true'] .titlebar-buttonbox-container {
margin-right: auto;
width: fit-content;
}
#TabsToolbar > * {
justify-content: center;
}