Fix sidebar button targeting in ZenUIManager and adjust CSS for right-side layout

This commit is contained in:
mr. M
2025-01-25 17:09:33 +01:00
parent 63fcbc73a5
commit 3fba559323
2 changed files with 5 additions and 4 deletions

View File

@@ -411,7 +411,7 @@ var gZenVerticalTabsManager = {
if (isRightSide && !isSidebarExpanded) {
navBar.appendChild(windowButtons);
} else {
document.getElementById('zen-sidebar-top-buttons-customization-target').appendChild(windowButtons);
topButtons.appendChild(windowButtons);
}
} else if (!isSingleToolbar && !isCompactMode) {
if (this.isWindowsStyledButtons) {

View File

@@ -37,10 +37,11 @@
width: fit-content;
}
&:root[zen-right-side='true'] #zen-sidebar-top-buttons-customization-target .titlebar-buttonbox-container {
/* Must have the zen-sidebar-top-buttons-customization-target so we target it only when it's on the sidebar */
margin-right: calc(-2 * var(--zen-toolbox-padding));
&:root[zen-right-side='true'] #zen-sidebar-top-buttons .titlebar-buttonbox-container {
/* Must have the #zen-sidebar-top-buttons so we target it only when it's on the sidebar */
margin-right: calc(-1 * var(--zen-toolbox-padding));
margin-top: -10px /*Make sure this stays synced with the top buttons' margin!*/;
height: calc(4px + var(--zen-toolbar-height)) !important;
& .titlebar-button {
align-items: end;