Refactor ZenCompactModeManager and ZenStartup.mjs

This commit is contained in:
mauro-balades
2024-09-21 16:11:07 +02:00
parent e4aa905440
commit 4510bc64d6
12 changed files with 242 additions and 85 deletions

View File

@@ -128,15 +128,14 @@
splitter.setAttribute('resizeafter', 'none');
toolbox.insertAdjacentElement('afterend', splitter);
this._moveWindowButtons();
this._addSidebarButtons();
this._hideToolbarButtons();
},
_moveWindowButtons() {
const windowControls = document.getElementById('titlebar-buttonbox-container');
const toolboxIcons = document.getElementById('zen-sidebar-top-buttons');
if (AppConstants.platform == "macosx") {
const windowControls = document.getElementsByClassName('titlebar-buttonbox-container')[0];
const toolboxIcons = document.getElementById('zen-sidebar-top-buttons-customization-target');
if (AppConstants.platform === "macosx") {
toolboxIcons.prepend(windowControls);
}
},
@@ -221,6 +220,8 @@
CustomizableUI.registerToolbarNode(
document.getElementById('zen-sidebar-icons-wrapper')
);
this._moveWindowButtons();
}, 100);
},