🐛 Fix vertical tab pinning

This commit is contained in:
TrickyPR 2023-07-13 19:23:49 +10:00
parent 9767f817e8
commit 2e9d6dd09e
3 changed files with 30 additions and 8 deletions

View File

@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## 1.0.0-a.77
### Fixed
- Pinned vertical tabs are no longer positioned. Sorta defeats their purpose, but it stops a semi-major bug
## 1.0.0-a.75
### Changed

View File

@ -1,5 +1,5 @@
diff --git a/browser/base/content/tabbrowser-tabs.js b/browser/base/content/tabbrowser-tabs.js
index 06c2479886f0e3a7c5ba6d8d939a2c1f0f19442d..6426d849d2afa12e123f8a1811aeb16515448158 100644
index 06c2479886f0e3a7c5ba6d8d939a2c1f0f19442d..a5cbea88e9baa22c42c35c80a1f622db8bd52b43 100644
--- a/browser/base/content/tabbrowser-tabs.js
+++ b/browser/base/content/tabbrowser-tabs.js
@@ -168,7 +168,14 @@
@ -155,7 +155,21 @@ index 06c2479886f0e3a7c5ba6d8d939a2c1f0f19442d..6426d849d2afa12e123f8a1811aeb165
for (let tab of movingTabs) {
tab.setAttribute("tabdrop-samewindow", "true");
tab.style.transform = "translateX(" + newTranslateX + "px)";
@@ -1485,19 +1533,33 @@
@@ -1414,7 +1462,13 @@
_positionPinnedTabs() {
let tabs = this._getVisibleTabs();
let numPinned = gBrowser._numPinnedTabs;
+ // Do not try and position vertical pinned tabs
+ const verticalTabs = Services.prefs.getBoolPref(
+ "pulse.tabs.vertical",
+ false
+ );
let doPosition =
+ !verticalTabs &&
this.getAttribute("overflow") == "true" &&
tabs.length > numPinned &&
numPinned > 0;
@@ -1485,19 +1539,33 @@
}
}
@ -195,7 +209,7 @@ index 06c2479886f0e3a7c5ba6d8d939a2c1f0f19442d..6426d849d2afa12e123f8a1811aeb165
let pinned = draggedTab.pinned;
let numPinned = gBrowser._numPinnedTabs;
@@ -1506,36 +1568,40 @@
@@ -1506,36 +1574,40 @@
pinned ? numPinned : undefined
);
@ -247,7 +261,7 @@ index 06c2479886f0e3a7c5ba6d8d939a2c1f0f19442d..6426d849d2afa12e123f8a1811aeb165
}
draggedTab._dragData.translateX = translateX;
@@ -1568,11 +1634,11 @@
@@ -1568,11 +1640,11 @@
if (tabs[mid] == draggedTab && ++mid > high) {
break;
}
@ -261,7 +275,7 @@ index 06c2479886f0e3a7c5ba6d8d939a2c1f0f19442d..6426d849d2afa12e123f8a1811aeb165
tabCenter
) {
low = mid + 1;
@@ -1595,16 +1661,16 @@
@@ -1595,16 +1667,16 @@
for (let tab of tabs) {
if (tab != draggedTab) {
let shift = getTabShift(tab, newIndex);

View File

@ -139,9 +139,11 @@
padding-inline-start: 0;
}
#browser #TabsToolbar[collapse='true'] .tabbrowser-tab {
/* Animate tabs out vertically */
transition: min-height 100ms ease-out, max-height 100ms ease-out;
#browser
#tabbrowser-tabs[haspinnedtabs]:not([positionpinnedtabs])
> #tabbrowser-arrowscrollbox
> .tabbrowser-tab[first-visible-unpinned-tab] {
margin-inline-start: 0px !important;
}
#verticaltabs-splitter {