This commit is contained in:
mr. M
2025-03-21 07:51:28 +01:00
3 changed files with 17 additions and 13 deletions

View File

@@ -28,7 +28,7 @@
width: 100%;
& toolbarbutton {
margin: auto;
margin: 0;
width: 25px;
display: flex;
justify-content: center;

View File

@@ -873,6 +873,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
await ZenWorkspacesStorage.removeWorkspace(windowID);
await this._propagateWorkspaceData();
await this._updateWorkspacesChangeContextMenu();
this.onWindowResize();
}
isWorkspaceActive(workspace) {
@@ -1931,6 +1932,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
}
await this.changeWorkspace(workspaceData);
}
this.onWindowResize();
return workspaceData;
}
@@ -2379,14 +2381,16 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
if (!parent) {
return;
}
// Once we are overflowing, we align the buttons to always stay inside the container,
// meaning we need to remove the overflow attribute to reset the width
parent.removeAttribute('overflow');
const overflow = parent.scrollWidth > parent.clientWidth;
parent.toggleAttribute('overflow', overflow);
// The maximum width a button has when it overflows based on the number of buttons
const numButtons = parent.children.length + 1; // +1 to exclude the active button
const maxWidth = 100 / numButtons;
parent.style.setProperty('--zen-overflowed-workspace-button-width', `${maxWidth}%`);
window.requestAnimationFrame(() => {
// Once we are overflowing, we align the buttons to always stay inside the container,
// meaning we need to remove the overflow attribute to reset the width
parent.removeAttribute('overflow');
const overflow = parent.scrollWidth > parent.clientWidth;
parent.toggleAttribute('overflow', overflow);
// The maximum width a button has when it overflows based on the number of buttons
const numButtons = parent.children.length + 1; // +1 to exclude the active button
const maxWidth = 100 / numButtons;
parent.style.setProperty('--zen-overflowed-workspace-button-width', `${maxWidth}%`);
});
}
})();

View File

@@ -19,7 +19,7 @@
"brandShortName": "Zen",
"brandFullName": "Zen Browser",
"release": {
"displayVersion": "1.10b",
"displayVersion": "1.10.1b",
"github": {
"repo": "zen-browser/desktop"
},
@@ -39,7 +39,7 @@
"brandShortName": "Twilight",
"brandFullName": "Zen Twilight",
"release": {
"displayVersion": "1.10t",
"displayVersion": "1.10.1t",
"github": {
"repo": "zen-browser/desktop"
}
@@ -53,4 +53,4 @@
"licenseType": "MPL-2.0"
},
"updateHostname": "updates.zen-browser.app"
}
}