From 4d4d6970e3f6d937f22513d4479128df6c0bbf96 Mon Sep 17 00:00:00 2001 From: "mr. m" Date: Sun, 15 Feb 2026 22:31:59 +0100 Subject: [PATCH] fix: Fixed DnD indicator not showing when there are no pinned tabs, b=no-bug, c=common, tabs --- .../content/widgets/arrowscrollbox-js.patch | 4 ++-- src/zen/common/modules/ZenUIManager.mjs | 2 +- src/zen/common/styles/zen-omnibox.css | 2 +- src/zen/drag-and-drop/ZenDragAndDrop.js | 17 +++++++++++------ src/zen/tabs/zen-tabs/vertical-tabs.css | 2 +- 5 files changed, 16 insertions(+), 11 deletions(-) diff --git a/src/toolkit/content/widgets/arrowscrollbox-js.patch b/src/toolkit/content/widgets/arrowscrollbox-js.patch index 25a8a66c9..b81b366f9 100644 --- a/src/toolkit/content/widgets/arrowscrollbox-js.patch +++ b/src/toolkit/content/widgets/arrowscrollbox-js.patch @@ -1,5 +1,5 @@ diff --git a/toolkit/content/widgets/arrowscrollbox.js b/toolkit/content/widgets/arrowscrollbox.js -index b80d1049bb6ae305f2ac9c4c35fe975fd508031c..0d900883d903ed48ac57863c0468ab39a6f3d98f 100644 +index b80d1049bb6ae305f2ac9c4c35fe975fd508031c..9bc80194d4e35f663b5c15baae55fa48eed4ffe9 100644 --- a/toolkit/content/widgets/arrowscrollbox.js +++ b/toolkit/content/widgets/arrowscrollbox.js @@ -98,6 +98,7 @@ @@ -15,7 +15,7 @@ index b80d1049bb6ae305f2ac9c4c35fe975fd508031c..0d900883d903ed48ac57863c0468ab39 on_wheel(event) { // Don't consume the event if we can't scroll. - if (!this.overflowing) { -+ if (!this.overflowing || this.id === 'tabbrowser-arrowscrollbox' || ((event.deltaY == 0 || gZenWorkspaces._swipeState?.isGestureActive) && this.classList.contains('workspace-arrowscrollbox'))) { ++ if (!this.overflowing || this.id === 'tabbrowser-arrowscrollbox' || ((event.deltaY == 0 || window.gZenWorkspaces?._swipeState?.isGestureActive) && this.classList.contains('workspace-arrowscrollbox'))) { return; } diff --git a/src/zen/common/modules/ZenUIManager.mjs b/src/zen/common/modules/ZenUIManager.mjs index 282db3521..02dc60f83 100644 --- a/src/zen/common/modules/ZenUIManager.mjs +++ b/src/zen/common/modules/ZenUIManager.mjs @@ -222,7 +222,7 @@ window.gZenUIManager = { "--zen-urlbar-top", `${window.innerHeight / 2 - Math.max(kUrlbarHeight, gURLBar.getBoundingClientRect().height) / 2}px` ); - gURLBar.style.setProperty("--zen-urlbar-width", `${Math.min(window.innerWidth / 2, 700)}px`); + gURLBar.style.setProperty("--zen-urlbar-width", `${Math.min(window.innerWidth / 2, 750)}px`); gZenVerticalTabsManager.actualWindowButtons.removeAttribute("zen-has-hover"); gZenVerticalTabsManager.recalculateURLBarHeight(); if (!this._preventToolbarRebuild) { diff --git a/src/zen/common/styles/zen-omnibox.css b/src/zen/common/styles/zen-omnibox.css index 932338df0..41f20ac2e 100644 --- a/src/zen/common/styles/zen-omnibox.css +++ b/src/zen/common/styles/zen-omnibox.css @@ -17,7 +17,7 @@ } .urlbar { - --urlbarView-separator-color: light-dark(hsl(0, 0%, 89%), hsl(0, 0%, 20%)); + --urlbarView-separator-color: light-dark(hsl(0, 0%, 92%), hsl(0, 0%, 20%)); --urlbarView-hover-background: var(--toolbarbutton-hover-background); --urlbarView-highlight-background: var(--toolbarbutton-hover-background); border-radius: calc(var(--toolbarbutton-border-radius) - 2px); diff --git a/src/zen/drag-and-drop/ZenDragAndDrop.js b/src/zen/drag-and-drop/ZenDragAndDrop.js index 37cccf4a3..9fc7ac301 100644 --- a/src/zen/drag-and-drop/ZenDragAndDrop.js +++ b/src/zen/drag-and-drop/ZenDragAndDrop.js @@ -941,14 +941,19 @@ ); if (event.target.classList.contains("zen-workspace-empty-space") || hoveringPeriphery) { let lastTab = gBrowser.tabs.at(-1); - dropElement = - (hoveringPeriphery && Services.prefs.getBoolPref("zen.view.show-newtab-button-top") - ? this._tabbrowserTabs.ariaFocusableItems.at( - gBrowser._numVisiblePinTabsWithoutCollapsed - ) - : this._tabbrowserTabs.ariaFocusableItems.at(-1)) || lastTab; + let pinnedTabsCount = gBrowser._numVisiblePinTabsWithoutCollapsed; + // Only if there are no normal tabs to drop after showIndicatorUnderNewTabButton = lastTab.hasAttribute("zen-empty-tab"); + let useLastPinnd = + (hoveringPeriphery || + (showIndicatorUnderNewTabButton && + !(pinnedTabsCount - gBrowser._numZenEssentials))) && + Services.prefs.getBoolPref("zen.view.show-newtab-button-top"); + dropElement = + (useLastPinnd + ? this._tabbrowserTabs.ariaFocusableItems.at(pinnedTabsCount) + : this._tabbrowserTabs.ariaFocusableItems.at(-1)) || lastTab; } } dropElement = elementToMove(dropElement); diff --git a/src/zen/tabs/zen-tabs/vertical-tabs.css b/src/zen/tabs/zen-tabs/vertical-tabs.css index 26cf51eec..bb9dff0c4 100644 --- a/src/zen/tabs/zen-tabs/vertical-tabs.css +++ b/src/zen/tabs/zen-tabs/vertical-tabs.css @@ -1130,7 +1130,7 @@ position: absolute; :root[zen-single-toolbar="true"] &:not(:empty) { - padding-top: 6px; + padding-top: 4px; } &[hidden="true"] {