mirror of
https://github.com/zen-browser/desktop.git
synced 2025-09-07 11:58:20 +00:00
133 lines
5.0 KiB
C++
133 lines
5.0 KiB
C++
diff --git a/browser/components/tabbrowser/content/tabs.js b/browser/components/tabbrowser/content/tabs.js
|
|
index f3a2f226a9056c5a75023281fdeb704cec49b4a6..39c46b141145864fb3b8043d2a9865299561a6cc 100644
|
|
--- a/browser/components/tabbrowser/content/tabs.js
|
|
+++ b/browser/components/tabbrowser/content/tabs.js
|
|
@@ -894,7 +894,7 @@
|
|
let postTransitionCleanup = () => {
|
|
tab.removeAttribute("tabdrop-samewindow");
|
|
|
|
- this._finishAnimateTabMove();
|
|
+ this._finishAnimateTabMove(true);
|
|
if (dropIndex !== false) {
|
|
gBrowser.moveTabTo(tab, dropIndex);
|
|
if (incrementDropIndex) {
|
|
@@ -904,7 +904,7 @@
|
|
|
|
gBrowser.syncThrobberAnimations(tab);
|
|
};
|
|
- if (gReduceMotion) {
|
|
+ if (gReduceMotion || true) {
|
|
postTransitionCleanup();
|
|
} else {
|
|
let onTransitionEnd = transitionendEvent => {
|
|
@@ -1284,7 +1284,7 @@
|
|
}
|
|
}
|
|
|
|
- let allChildren = [...verticalPinnedTabsContainer.children, ...children];
|
|
+ let allChildren = [...document.getElementById("zen-essentials-container").children, ...verticalPinnedTabsContainer.children, ...children];
|
|
this._allTabs = allChildren;
|
|
return allChildren;
|
|
}
|
|
@@ -1480,7 +1480,7 @@
|
|
let rect = ele => {
|
|
return window.windowUtils.getBoundsWithoutFlushing(ele);
|
|
};
|
|
- let tab = this._getVisibleTabs()[gBrowser._numPinnedTabs];
|
|
+ let tab = this._getVisibleTabs()[gBrowser._numVisiblePinTabs];
|
|
if (tab && rect(tab).width <= this._tabClipWidth) {
|
|
this.setAttribute("closebuttons", "activetab");
|
|
} else {
|
|
@@ -1499,10 +1499,12 @@
|
|
|
|
_handleTabSelect(aInstant) {
|
|
let selectedTab = this.selectedItem;
|
|
- if (this.overflowing) {
|
|
- this.arrowScrollbox.ensureElementIsVisible(selectedTab, aInstant);
|
|
- }
|
|
+ this.arrowScrollbox.ensureElementIsVisible(selectedTab, aInstant);
|
|
|
|
+ if (!aInstant && Services.prefs.getBoolPref('zen.view.compact')
|
|
+ && Services.prefs.getBoolPref('zen.view.compact.toolbar-flash-popup')) {
|
|
+ gZenCompactModeManager.flashSidebar();
|
|
+ }
|
|
selectedTab._notselectedsinceload = false;
|
|
}
|
|
|
|
@@ -1550,7 +1552,7 @@
|
|
if (isEndTab && !this._hasTabTempMaxWidth) {
|
|
return;
|
|
}
|
|
- let numPinned = gBrowser._numPinnedTabs;
|
|
+ let numPinned = gBrowser._numVisiblePinTabs;
|
|
// Force tabs to stay the same width, unless we're closing the last tab,
|
|
// which case we need to let them expand just enough so that the overall
|
|
// tabbar width is the same.
|
|
@@ -1565,7 +1567,7 @@
|
|
let tabsToReset = [];
|
|
for (let i = numPinned; i < tabs.length; i++) {
|
|
let tab = tabs[i];
|
|
- tab.style.setProperty("max-width", aTabWidth, "important");
|
|
+ //tab.style.setProperty("max-width", aTabWidth, "important");
|
|
if (!isEndTab) {
|
|
// keep tabs the same width
|
|
tab.style.transition = "none";
|
|
@@ -1630,13 +1632,13 @@
|
|
let verticalTabsContainer = document.getElementById(
|
|
"vertical-pinned-tabs-container"
|
|
);
|
|
- let numPinned = gBrowser._numPinnedTabs;
|
|
+ let numPinned = gBrowser._numVisiblePinTabs;
|
|
|
|
- if (gBrowser._numPinnedTabs !== verticalTabsContainer.children.length) {
|
|
+ if (gBrowser._numVisiblePinTabs !== verticalTabsContainer.children.length) {
|
|
let tabs = this._getVisibleTabs();
|
|
for (let i = 0; i < numPinned; i++) {
|
|
tabs[i].style.marginInlineStart = "";
|
|
- verticalTabsContainer.appendChild(tabs[i]);
|
|
+ tabs[i].hasAttribute("zen-essential") ? document.getElementById("zen-essentials-container").appendChild(tabs[i]) : verticalTabsContainer.appendChild(tabs[i]);
|
|
}
|
|
}
|
|
|
|
@@ -1660,7 +1662,7 @@
|
|
|
|
_positionPinnedTabs() {
|
|
let tabs = this._getVisibleTabs();
|
|
- let numPinned = gBrowser._numPinnedTabs;
|
|
+ let numPinned = gBrowser._numVisiblePinTabs;
|
|
let absPositionHorizontalTabs =
|
|
this.overflowing && tabs.length > numPinned && numPinned > 0;
|
|
|
|
@@ -1934,7 +1936,7 @@
|
|
}
|
|
|
|
let pinned = draggedTab.pinned;
|
|
- let numPinned = gBrowser._numPinnedTabs;
|
|
+ let numPinned = gBrowser._numVisiblePinTabs;
|
|
let tabs = this._getVisibleTabs().slice(
|
|
pinned ? 0 : numPinned,
|
|
pinned ? numPinned : undefined
|
|
@@ -2059,8 +2061,8 @@
|
|
}
|
|
}
|
|
|
|
- _finishAnimateTabMove() {
|
|
- if (!this.hasAttribute("movingtab")) {
|
|
+ _finishAnimateTabMove(always = false) {
|
|
+ if (!this.hasAttribute("movingtab") && !always) {
|
|
return;
|
|
}
|
|
|
|
@@ -2218,9 +2220,9 @@
|
|
function newIndex(aTab, index) {
|
|
// Don't allow mixing pinned and unpinned tabs.
|
|
if (aTab.pinned) {
|
|
- return Math.min(index, gBrowser._numPinnedTabs - 1);
|
|
+ return Math.min(index, gBrowser._numVisiblePinTabs - 1);
|
|
}
|
|
- return Math.max(index, gBrowser._numPinnedTabs);
|
|
+ return Math.max(index, gBrowser._numVisiblePinTabs);
|
|
}
|
|
}
|
|
|