mirror of
https://github.com/zen-browser/desktop.git
synced 2025-07-07 21:49:58 +02:00
Applied common fixes
This commit is contained in:
parent
dc1c166ac2
commit
6115bbabc8
5 changed files with 45 additions and 18 deletions
|
@ -126,6 +126,8 @@
|
|||
}
|
||||
|
||||
:root[zen-single-toolbar='true'] {
|
||||
--urlbar-icon-border-radius: 10px !important;
|
||||
|
||||
.urlbar-page-action:not([open]):not(#identity-permission-box),
|
||||
#tracking-protection-icon-container {
|
||||
display: none;
|
||||
|
@ -301,7 +303,7 @@ button.popup-notification-dropmarker {
|
|||
#urlbar .urlbar-page-action,
|
||||
#urlbar #tracking-protection-icon-container,
|
||||
#urlbar:not([breakout-extend='true']) #identity-box:is(:not(.chromeUI), [pageproxystate='invalid']) #identity-icon-box {
|
||||
border-radius: 8px !important;
|
||||
border-radius: var(--urlbar-icon-border-radius) !important;
|
||||
}
|
||||
|
||||
/* Extensions or similar */
|
||||
|
|
|
@ -38,6 +38,9 @@
|
|||
}
|
||||
|
||||
onKeyDown(event) {
|
||||
if (event.defaultPrevented) {
|
||||
return;
|
||||
}
|
||||
if (event.key === 'Escape' && this.#currentGlanceID) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
|
|
@ -1544,6 +1544,16 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
|||
}
|
||||
}
|
||||
|
||||
_makeSureEmptyTabIsLast() {
|
||||
const emptyTab = this._emptyTab;
|
||||
if (emptyTab) {
|
||||
const container = this.activeWorkspaceStrip;
|
||||
if (container) {
|
||||
container.insertBefore(emptyTab, container.lastChild);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_updateMarginTopPinnedTabs(arrowscrollbox, pinnedContainer) {
|
||||
if (arrowscrollbox) {
|
||||
arrowscrollbox.style.marginTop = pinnedContainer.getBoundingClientRect().height + 'px';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
|
||||
index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..20c92611723587e4eeed5889b2b1741d86368263 100644
|
||||
index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..2766dcccb4cc0c435b06a2f61d382f91676f569e 100644
|
||||
--- a/browser/components/tabbrowser/content/tabbrowser.js
|
||||
+++ b/browser/components/tabbrowser/content/tabbrowser.js
|
||||
@@ -406,11 +406,50 @@
|
||||
|
@ -422,11 +422,20 @@ index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..20c92611723587e4eeed5889b2b1741d
|
|||
|
||||
this._handleTabMove(aTab, () => {
|
||||
- let neighbor = this.tabs[aIndex];
|
||||
+ let neighbor = this.tabs.filter(tab => !tab.hasAttribute("zen-glance-tab") && !tab.hasAttribute("zen-empty-tab"))[aIndex];
|
||||
+ let neighbor = this.tabs.filter(tab => !tab.hasAttribute("zen-glance-tab"))[aIndex];
|
||||
if (forceStandaloneTab && neighbor.group) {
|
||||
neighbor = neighbor.group;
|
||||
}
|
||||
@@ -5802,7 +5914,7 @@
|
||||
@@ -5754,6 +5866,8 @@
|
||||
|
||||
moveActionCallback();
|
||||
|
||||
+ ZenWorkspaces._makeSureEmptyTabIsLast();
|
||||
+
|
||||
// Clear tabs cache after moving nodes because the order of tabs may have
|
||||
// changed.
|
||||
this.tabContainer._invalidateCachedTabs();
|
||||
@@ -5802,7 +5916,7 @@
|
||||
createLazyBrowser,
|
||||
};
|
||||
|
||||
|
@ -435,7 +444,7 @@ index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..20c92611723587e4eeed5889b2b1741d
|
|||
if (aIndex < numPinned || (aTab.pinned && aIndex == numPinned)) {
|
||||
params.pinned = true;
|
||||
}
|
||||
@@ -7443,6 +7555,7 @@
|
||||
@@ -7443,6 +7557,7 @@
|
||||
aWebProgress.isTopLevel
|
||||
) {
|
||||
this.mTab.setAttribute("busy", "true");
|
||||
|
@ -443,7 +452,7 @@ index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..20c92611723587e4eeed5889b2b1741d
|
|||
gBrowser._tabAttrModified(this.mTab, ["busy"]);
|
||||
this.mTab._notselectedsinceload = !this.mTab.selected;
|
||||
gBrowser.syncThrobberAnimations(this.mTab);
|
||||
@@ -8411,7 +8524,7 @@ var TabContextMenu = {
|
||||
@@ -8411,7 +8526,7 @@ var TabContextMenu = {
|
||||
);
|
||||
contextUnpinSelectedTabs.hidden =
|
||||
!this.contextTab.pinned || !multiselectionContext;
|
||||
|
@ -452,7 +461,7 @@ index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..20c92611723587e4eeed5889b2b1741d
|
|||
// Move Tab items
|
||||
let contextMoveTabOptions = document.getElementById(
|
||||
"context_moveTabOptions"
|
||||
@@ -8444,7 +8557,7 @@ var TabContextMenu = {
|
||||
@@ -8444,7 +8559,7 @@ var TabContextMenu = {
|
||||
let contextMoveTabToStart = document.getElementById("context_moveToStart");
|
||||
let isFirstTab =
|
||||
tabsToMove[0] == visibleTabs[0] ||
|
||||
|
@ -461,7 +470,7 @@ index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..20c92611723587e4eeed5889b2b1741d
|
|||
contextMoveTabToStart.disabled = isFirstTab && allSelectedTabsAdjacent;
|
||||
|
||||
document.getElementById("context_openTabInWindow").disabled =
|
||||
@@ -8677,6 +8790,7 @@ var TabContextMenu = {
|
||||
@@ -8677,6 +8792,7 @@ var TabContextMenu = {
|
||||
if (this.contextTab.multiselected) {
|
||||
gBrowser.removeMultiSelectedTabs();
|
||||
} else {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git a/browser/components/tabbrowser/content/tabs.js b/browser/components/tabbrowser/content/tabs.js
|
||||
index 8aeb244ffca9f48661805f5b7d860b5896055562..8300aa0533cb0037be26766acf1d82af295c7369 100644
|
||||
index 8aeb244ffca9f48661805f5b7d860b5896055562..53ac909f773efab33e0d69e53dd557b76c00fa13 100644
|
||||
--- a/browser/components/tabbrowser/content/tabs.js
|
||||
+++ b/browser/components/tabbrowser/content/tabs.js
|
||||
@@ -94,7 +94,7 @@
|
||||
|
@ -329,20 +329,23 @@ index 8aeb244ffca9f48661805f5b7d860b5896055562..8300aa0533cb0037be26766acf1d82af
|
|||
|
||||
let directionX = screenX > dragData.animLastScreenX;
|
||||
let directionY = screenY > dragData.animLastScreenY;
|
||||
@@ -2257,9 +2285,9 @@
|
||||
@@ -2257,10 +2285,11 @@
|
||||
}
|
||||
|
||||
let pinned = draggedTab.pinned;
|
||||
- let numPinned = gBrowser.pinnedTabCount;
|
||||
- let tabs = this.visibleTabs.slice(
|
||||
- pinned ? 0 : numPinned,
|
||||
- pinned ? numPinned : undefined
|
||||
+ let numPinned = gBrowser._numVisiblePinTabs;
|
||||
+ let essential = draggedTab.hasAttribute("zen-essential");
|
||||
+ let tabs = this.visibleTabs.filter(tab => !tab.hasAttribute("zen-glance-tab")).slice(
|
||||
+ pinned ? gBrowser._numZenEssentials : numPinned,
|
||||
pinned ? numPinned : undefined
|
||||
+ pinned ? (essential ? 0 : gBrowser._numZenEssentials) : numPinned,
|
||||
+ pinned ? (essential ? gBrowser._numZenEssentials : (numPinned-gBrowser._numZenEssentials)) : undefined
|
||||
);
|
||||
|
||||
@@ -2502,8 +2530,9 @@
|
||||
if (this.#rtlMode) {
|
||||
@@ -2502,8 +2531,9 @@
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -354,7 +357,7 @@ index 8aeb244ffca9f48661805f5b7d860b5896055562..8300aa0533cb0037be26766acf1d82af
|
|||
return;
|
||||
}
|
||||
|
||||
@@ -2668,9 +2697,9 @@
|
||||
@@ -2668,9 +2698,9 @@
|
||||
function newIndex(aTab, index) {
|
||||
// Don't allow mixing pinned and unpinned tabs.
|
||||
if (aTab.pinned) {
|
||||
|
@ -366,7 +369,7 @@ index 8aeb244ffca9f48661805f5b7d860b5896055562..8300aa0533cb0037be26766acf1d82af
|
|||
}
|
||||
}
|
||||
|
||||
@@ -2754,7 +2783,7 @@
|
||||
@@ -2754,7 +2784,7 @@
|
||||
}
|
||||
|
||||
_notifyBackgroundTab(aTab) {
|
||||
|
@ -375,7 +378,7 @@ index 8aeb244ffca9f48661805f5b7d860b5896055562..8300aa0533cb0037be26766acf1d82af
|
|||
return;
|
||||
}
|
||||
|
||||
@@ -2772,12 +2801,14 @@
|
||||
@@ -2772,12 +2802,14 @@
|
||||
selectedTab = {
|
||||
left: selectedTab.left,
|
||||
right: selectedTab.right,
|
||||
|
@ -391,7 +394,7 @@ index 8aeb244ffca9f48661805f5b7d860b5896055562..8300aa0533cb0037be26766acf1d82af
|
|||
selectedTab,
|
||||
];
|
||||
})
|
||||
@@ -2794,8 +2825,11 @@
|
||||
@@ -2794,8 +2826,11 @@
|
||||
delete this._lastTabToScrollIntoView;
|
||||
// Is the new tab already completely visible?
|
||||
if (
|
||||
|
@ -405,7 +408,7 @@ index 8aeb244ffca9f48661805f5b7d860b5896055562..8300aa0533cb0037be26766acf1d82af
|
|||
) {
|
||||
return;
|
||||
}
|
||||
@@ -2803,21 +2837,29 @@
|
||||
@@ -2803,21 +2838,29 @@
|
||||
if (this.arrowScrollbox.smoothScroll) {
|
||||
// Can we make both the new tab and the selected tab completely visible?
|
||||
if (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue