mirror of
https://github.com/zen-browser/desktop.git
synced 2025-10-16 14:56:14 +00:00
fix: Small fixes for workspaces icons, b=(no-bug), c=common, tabs, workspaces
This commit is contained in:
@@ -362,7 +362,7 @@ menuseparator {
|
||||
gap: 10px;
|
||||
z-index: 1000;
|
||||
padding: var(--zen-toast-padding);
|
||||
border-radius: calc(var(--zen-native-inner-radius) + 8px);
|
||||
border-radius: calc(var(--zen-native-inner-radius) + 6px);
|
||||
background: linear-gradient(
|
||||
170deg,
|
||||
var(--zen-primary-color) -40%,
|
||||
@@ -397,7 +397,7 @@ menuseparator {
|
||||
padding: 0 12px !important;
|
||||
min-width: unset !important;
|
||||
margin: 0px !important;
|
||||
border-radius: calc(var(--zen-native-inner-radius) + 4px) !important;
|
||||
border-radius: calc(var(--zen-native-inner-radius) + 2px) !important;
|
||||
|
||||
:root[zen-right-side='true'] & {
|
||||
order: -1;
|
||||
|
@@ -236,8 +236,8 @@
|
||||
continue;
|
||||
}
|
||||
|
||||
if (pin.title && (pin.editedTitle || tab.hasAttribute('zen-has-static-label'))) {
|
||||
tab.removeAttribute('zen-has-static-label'); // So we can set it again
|
||||
tab.removeAttribute('zen-has-static-label'); // So we can set it again
|
||||
if (pin.title && pin.editedTitle) {
|
||||
gBrowser._setTabLabel(tab, pin.title, { beforeTabOpen: true });
|
||||
tab.setAttribute('zen-has-static-label', 'true');
|
||||
}
|
||||
|
@@ -58,21 +58,29 @@
|
||||
|
||||
set activeIndex(uuid) {
|
||||
const buttons = this.querySelectorAll('toolbarbutton');
|
||||
let i = 0;
|
||||
let selected = 0;
|
||||
for (const button of buttons) {
|
||||
if (button.getAttribute('zen-workspace-id') == uuid) {
|
||||
button.setAttribute('active', 'true');
|
||||
selected = i;
|
||||
} else {
|
||||
button.removeAttribute('active');
|
||||
}
|
||||
selected++;
|
||||
}
|
||||
buttons[selected].setAttribute('active', true);
|
||||
this.setAttribute('selected', selected);
|
||||
}
|
||||
|
||||
get activeIndex() {
|
||||
const selected = this.getAttribute('selected');
|
||||
const buttons = this.querySelectorAll('toolbarbutton');
|
||||
let i = 0;
|
||||
for (const button of buttons) {
|
||||
if (button.hasAttribute('active')) {
|
||||
if (i == selected) {
|
||||
return button.getAttribute('zen-workspace-id');
|
||||
}
|
||||
i++;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
@@ -2410,7 +2410,6 @@ var gZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
});
|
||||
await this._organizeWorkspaceStripLocations(workspace, true);
|
||||
gZenUIManager.tabsWrapper.style.scrollbarWidth = '';
|
||||
this.workspaceIcons.activeIndex = workspace.uuid;
|
||||
|
||||
// Notify listeners
|
||||
if (this._changeListeners?.length) {
|
||||
|
Reference in New Issue
Block a user