Compare commits

..

4 Commits

5 changed files with 37 additions and 8 deletions

2
l10n

Submodule l10n updated: 0268dc81cf...706b333373

View File

@@ -23,6 +23,7 @@
hide-if-usercontext-disabled="true">
<menupopup />
</menu>
<menuseparator id="context_zenWorkspacesSeparator"/>
<menuseparator/>
<menuitem id="context_zenReorderWorkspaces" data-l10n-id="zen-workspaces-panel-context-reorder" command="cmd_zenReorderWorkspaces"/>
<menuseparator/>

View File

@@ -798,18 +798,16 @@
}
}
/* Center top buttons container */
& #zen-sidebar-top-buttons {
justify-content: center;
max-height: unset !important; /* Allow natural height */
max-height: unset !important;
height: fit-content !important;
}
/* Adjust titlebar layout for collapsed state */
& #titlebar {
display: grid;
grid-template-rows: auto 1fr; /* Allow content below button box */
overflow: hidden;
overflow: clip;
}
/* Style top buttons customization target */

View File

@@ -562,7 +562,9 @@ var gZenWorkspaces = new (class extends ZenMultiWindowFeature {
break;
}
requestAnimationFrame(() => {
gNavToolbox.setAttribute('zen-has-hover', 'true');
requestAnimationFrame(() => {
gNavToolbox.setAttribute('zen-has-hover', 'true');
});
});
}
@@ -1167,7 +1169,11 @@ var gZenWorkspaces = new (class extends ZenMultiWindowFeature {
} else {
openInContainerMenuItem.setAttribute('hidden', 'true');
}
const target = event.explicitOriginalTarget?.closest('toolbarbutton');
// Call parent node as on windows, the text can be double clicked
let target;
try {
target = event.explicitOriginalTarget?.closest('toolbarbutton');
} catch (_) {}
this.#contextMenuData = {
workspaceId: target?.getAttribute('zen-workspace-id'),
originalTarget: target,
@@ -1180,6 +1186,30 @@ var gZenWorkspaces = new (class extends ZenMultiWindowFeature {
themePicker.hidden =
this.#contextMenuData.workspaceId &&
this.#contextMenuData.workspaceId !== this.activeWorkspace;
const separator = document.getElementById('context_zenWorkspacesSeparator');
for (const item of event.target.querySelectorAll('.zen-workspace-context-menu-item')) {
item.remove();
}
if (!this.#contextMenuData.workspaceId) {
separator.hidden = false;
for (const workspace of [...this._workspaceCache.workspaces].reverse()) {
const item = document.createXULElement('menuitem');
item.className = 'zen-workspace-context-menu-item';
item.setAttribute('zen-workspace-id', workspace.uuid);
item.setAttribute('disabled', workspace.uuid === this.activeWorkspace);
let name = workspace.name;
if (workspace.icon && workspace.icon !== '') {
name = `${workspace.icon} ${name}`;
}
item.setAttribute('label', name);
item.addEventListener('command', (e) => {
this.changeWorkspaceWithID(e.target.closest('menuitem').getAttribute('zen-workspace-id'));
});
separator.after(item);
}
} else {
separator.hidden = true;
}
event.target.addEventListener(
'popuphidden',
() => {

View File

@@ -19,7 +19,7 @@
"brandShortName": "Zen",
"brandFullName": "Zen Browser",
"release": {
"displayVersion": "1.13.1b",
"displayVersion": "1.13.2b",
"github": {
"repo": "zen-browser/desktop"
},