mirror of
https://github.com/zen-browser/desktop.git
synced 2025-10-05 17:36:34 +00:00
Enhance UI styles and functionality for gradient generator, vertical tabs, and URL bar; improve tab management logic
This commit is contained in:
@@ -114,6 +114,7 @@
|
||||
userContextId,
|
||||
}),
|
||||
});
|
||||
this.resetPinChangedUrl(tab);
|
||||
}
|
||||
|
||||
get enabled() {
|
||||
@@ -215,6 +216,16 @@
|
||||
gBrowser._setTabLabel(tab, pin.title);
|
||||
tab.setAttribute('zen-has-static-label', 'true');
|
||||
}
|
||||
|
||||
// Reorder the tab if needed
|
||||
if (tab._tPos !== pin.position) {
|
||||
const parent = tab.parentNode;
|
||||
const isEssential = tab.hasAttribute('zen-essential');
|
||||
// If we arent an essential, we need to take into account
|
||||
// that the last child is a separator
|
||||
const childIndex = isEssential ? pin.position : Math.min(pin.position, parent.children.length - 1);
|
||||
parent.insertBefore(tab, parent.children[childIndex]);
|
||||
}
|
||||
}
|
||||
|
||||
// Third pass: create new tabs for pins that don't have tabs
|
||||
@@ -332,8 +343,6 @@
|
||||
}
|
||||
|
||||
// Recollect pinned tabs and essentials after a tab move
|
||||
const currentWorkspace = await ZenWorkspaces.getActiveWorkspace();
|
||||
|
||||
tab.position = tab._tPos;
|
||||
|
||||
for (let otherTab of gBrowser.tabs) {
|
||||
|
Reference in New Issue
Block a user