mirror of
https://github.com/zen-browser/desktop.git
synced 2025-09-05 19:08:18 +00:00
Refactor ZenCustomizableUI and update keyboard shortcuts preferences
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
}
|
||||
|
||||
#browser {
|
||||
--zen-toolbox-padding: 5px;
|
||||
--zen-toolbox-padding: 4px;
|
||||
}
|
||||
|
||||
#navigator-toolbox {
|
||||
|
@@ -1,10 +1,24 @@
|
||||
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
|
||||
index ef857bd81f2cd7c163ecc74ac1cf81a0b63ce838..215fd93aff26ee8a8dabac2fbf55285fcf8d15e2 100644
|
||||
index ef857bd81f2cd7c163ecc74ac1cf81a0b63ce838..807eb0c493f15643412b05d8dad81d36d7470155 100644
|
||||
--- a/browser/components/tabbrowser/content/tabbrowser.js
|
||||
+++ b/browser/components/tabbrowser/content/tabbrowser.js
|
||||
@@ -453,10 +453,14 @@
|
||||
@@ -452,11 +452,26 @@
|
||||
return duplicateTabs;
|
||||
},
|
||||
|
||||
+ get _numVisiblePinTabs() {
|
||||
+ let i = 0;
|
||||
+ for (let tab of this.tabs) {
|
||||
+ if (!tab.pinned) {
|
||||
+ break;
|
||||
+ }
|
||||
+ if (!tab.hidden) {
|
||||
+ i++;
|
||||
+ }
|
||||
+ }
|
||||
+ return i;
|
||||
+ },
|
||||
+
|
||||
get _numPinnedTabs() {
|
||||
- for (var i = 0; i < this.tabs.length; i++) {
|
||||
- if (!this.tabs[i].pinned) {
|
||||
@@ -13,13 +27,11 @@ index ef857bd81f2cd7c163ecc74ac1cf81a0b63ce838..215fd93aff26ee8a8dabac2fbf55285f
|
||||
+ if (!tab.pinned) {
|
||||
break;
|
||||
}
|
||||
+ if (!tab.hidden) {
|
||||
+ i++;
|
||||
+ }
|
||||
+ i++;
|
||||
}
|
||||
return i;
|
||||
},
|
||||
@@ -2704,6 +2708,11 @@
|
||||
@@ -2704,6 +2719,11 @@
|
||||
);
|
||||
}
|
||||
|
||||
@@ -31,7 +43,7 @@ index ef857bd81f2cd7c163ecc74ac1cf81a0b63ce838..215fd93aff26ee8a8dabac2fbf55285f
|
||||
if (!UserInteraction.running("browser.tabs.opening", window)) {
|
||||
UserInteraction.start("browser.tabs.opening", "initting", window);
|
||||
}
|
||||
@@ -2771,6 +2780,9 @@
|
||||
@@ -2771,6 +2791,9 @@
|
||||
noInitialLabel,
|
||||
skipBackgroundNotify,
|
||||
});
|
||||
@@ -41,7 +53,7 @@ index ef857bd81f2cd7c163ecc74ac1cf81a0b63ce838..215fd93aff26ee8a8dabac2fbf55285f
|
||||
if (insertTab) {
|
||||
// insert the tab into the tab container in the correct position
|
||||
this._insertTabAtIndex(t, {
|
||||
@@ -3248,6 +3260,14 @@
|
||||
@@ -3248,6 +3271,14 @@
|
||||
) {
|
||||
tabWasReused = true;
|
||||
tab = this.selectedTab;
|
||||
@@ -56,7 +68,7 @@ index ef857bd81f2cd7c163ecc74ac1cf81a0b63ce838..215fd93aff26ee8a8dabac2fbf55285f
|
||||
if (!tabData.pinned) {
|
||||
this.unpinTab(tab);
|
||||
} else {
|
||||
@@ -3297,6 +3317,13 @@
|
||||
@@ -3297,6 +3328,13 @@
|
||||
preferredRemoteType,
|
||||
});
|
||||
|
||||
@@ -70,7 +82,7 @@ index ef857bd81f2cd7c163ecc74ac1cf81a0b63ce838..215fd93aff26ee8a8dabac2fbf55285f
|
||||
if (select) {
|
||||
tabToSelect = tab;
|
||||
}
|
||||
@@ -4184,6 +4211,7 @@
|
||||
@@ -4184,6 +4222,7 @@
|
||||
isLastTab ||
|
||||
aTab.pinned ||
|
||||
aTab.hidden ||
|
||||
@@ -78,7 +90,7 @@ index ef857bd81f2cd7c163ecc74ac1cf81a0b63ce838..215fd93aff26ee8a8dabac2fbf55285f
|
||||
this._removingTabs.size >
|
||||
3 /* don't want lots of concurrent animations */ ||
|
||||
!aTab.hasAttribute(
|
||||
@@ -5117,10 +5145,10 @@
|
||||
@@ -5117,10 +5156,10 @@
|
||||
SessionStore.deleteCustomTabValue(aTab, "hiddenBy");
|
||||
},
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/tabbrowser/content/tabs.js b/browser/components/tabbrowser/content/tabs.js
|
||||
index 282e7f31fe158d929130c17628f7e30f690fd666..7225cb6bae5af213718a4e2df41f855631d6ce4e 100644
|
||||
index 282e7f31fe158d929130c17628f7e30f690fd666..213e6f1ea1cd454b4d0f3679a5acb414b0ef9242 100644
|
||||
--- a/browser/components/tabbrowser/content/tabs.js
|
||||
+++ b/browser/components/tabbrowser/content/tabs.js
|
||||
@@ -1387,10 +1387,12 @@
|
||||
@@ -18,3 +18,12 @@ index 282e7f31fe158d929130c17628f7e30f690fd666..7225cb6bae5af213718a4e2df41f8556
|
||||
selectedTab._notselectedsinceload = false;
|
||||
}
|
||||
|
||||
@@ -1629,7 +1631,7 @@
|
||||
}
|
||||
|
||||
let pinned = draggedTab.pinned;
|
||||
- let numPinned = gBrowser._numPinnedTabs;
|
||||
+ let numPinned = gBrowser._numVisiblePinTabs;
|
||||
let tabs = this._getVisibleTabs().slice(
|
||||
pinned ? 0 : numPinned,
|
||||
pinned ? numPinned : undefined
|
||||
|
Reference in New Issue
Block a user