mirror of
https://github.com/zen-browser/desktop.git
synced 2025-07-07 21:49:58 +02:00
fix: Fixed workspace overflows not working and refined new HSL picker, b=no-bug, c=tabs, common, compact-mode, workspaces
This commit is contained in:
parent
9971dbd0ad
commit
fe77048619
11 changed files with 89 additions and 49 deletions
|
@ -57,8 +57,8 @@
|
||||||
style="stroke-width: 8px;"/>
|
style="stroke-width: 8px;"/>
|
||||||
<defs>
|
<defs>
|
||||||
<linearGradient id="PanelUI-zen-gradient-generator-slider-wave-gradient" x1="0%" y1="0%" x2="100%" y2="0%">
|
<linearGradient id="PanelUI-zen-gradient-generator-slider-wave-gradient" x1="0%" y1="0%" x2="100%" y2="0%">
|
||||||
<stop offset="0%" stop-color="light-dark(rgb(77, 77, 77), rgb(161, 161, 161))"/>
|
<stop offset="0%" stop-color="light-dark(rgb(90, 90, 90), rgb(161, 161, 161))"/>
|
||||||
<stop offset="0%" stop-color="light-dark(rgba(77, 77, 77), rgba(161, 161, 161))"/>
|
<stop offset="0%" stop-color="light-dark(rgb(90, 90, 90), rgba(161, 161, 161))"/>
|
||||||
<stop offset="100%" stop-color="light-dark(rgba(77, 77, 77, 0.5), rgba(161, 161, 161, 0.5))"/>
|
<stop offset="100%" stop-color="light-dark(rgba(77, 77, 77, 0.5), rgba(161, 161, 161, 0.5))"/>
|
||||||
</linearGradient>
|
</linearGradient>
|
||||||
</defs>
|
</defs>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
diff --git a/browser/components/tabbrowser/content/tabs.js b/browser/components/tabbrowser/content/tabs.js
|
diff --git a/browser/components/tabbrowser/content/tabs.js b/browser/components/tabbrowser/content/tabs.js
|
||||||
index 67bba60cfc21b940f263e1eb26b8b5429355660f..0d493a544d20e75e6e847d93fad1e113c072241f 100644
|
index 67bba60cfc21b940f263e1eb26b8b5429355660f..9f73966429d8e82bb9ef0af73a996c8cff230eab 100644
|
||||||
--- a/browser/components/tabbrowser/content/tabs.js
|
--- a/browser/components/tabbrowser/content/tabs.js
|
||||||
+++ b/browser/components/tabbrowser/content/tabs.js
|
+++ b/browser/components/tabbrowser/content/tabs.js
|
||||||
@@ -83,7 +83,7 @@
|
@@ -83,7 +83,7 @@
|
||||||
|
@ -144,7 +144,15 @@ index 67bba60cfc21b940f263e1eb26b8b5429355660f..0d493a544d20e75e6e847d93fad1e113
|
||||||
}
|
}
|
||||||
|
|
||||||
get verticalMode() {
|
get verticalMode() {
|
||||||
@@ -1625,29 +1655,54 @@
|
@@ -1617,6 +1647,7 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
get overflowing() {
|
||||||
|
+ gZenWorkspaces.updateOverflowingTabs();
|
||||||
|
return this.hasAttribute("overflow");
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1625,29 +1656,54 @@
|
||||||
if (this.#allTabs) {
|
if (this.#allTabs) {
|
||||||
return this.#allTabs;
|
return this.#allTabs;
|
||||||
}
|
}
|
||||||
|
@ -207,7 +215,7 @@ index 67bba60cfc21b940f263e1eb26b8b5429355660f..0d493a544d20e75e6e847d93fad1e113
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1702,23 +1757,18 @@
|
@@ -1702,23 +1758,18 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
let elementIndex = 0;
|
let elementIndex = 0;
|
||||||
|
@ -235,7 +243,7 @@ index 67bba60cfc21b940f263e1eb26b8b5429355660f..0d493a544d20e75e6e847d93fad1e113
|
||||||
let visibleTabsInGroup = child.tabs.filter(tab => tab.visible);
|
let visibleTabsInGroup = child.tabs.filter(tab => tab.visible);
|
||||||
visibleTabsInGroup.forEach(tab => {
|
visibleTabsInGroup.forEach(tab => {
|
||||||
tab.elementIndex = elementIndex++;
|
tab.elementIndex = elementIndex++;
|
||||||
@@ -1728,10 +1778,7 @@
|
@@ -1728,10 +1779,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -247,7 +255,7 @@ index 67bba60cfc21b940f263e1eb26b8b5429355660f..0d493a544d20e75e6e847d93fad1e113
|
||||||
|
|
||||||
return this.#focusableItems;
|
return this.#focusableItems;
|
||||||
}
|
}
|
||||||
@@ -1739,6 +1786,7 @@
|
@@ -1739,6 +1787,7 @@
|
||||||
_invalidateCachedTabs() {
|
_invalidateCachedTabs() {
|
||||||
this.#allTabs = null;
|
this.#allTabs = null;
|
||||||
this._invalidateCachedVisibleTabs();
|
this._invalidateCachedVisibleTabs();
|
||||||
|
@ -255,7 +263,7 @@ index 67bba60cfc21b940f263e1eb26b8b5429355660f..0d493a544d20e75e6e847d93fad1e113
|
||||||
}
|
}
|
||||||
|
|
||||||
_invalidateCachedVisibleTabs() {
|
_invalidateCachedVisibleTabs() {
|
||||||
@@ -1753,8 +1801,8 @@
|
@@ -1753,8 +1802,8 @@
|
||||||
#isContainerVerticalPinnedGrid(tab) {
|
#isContainerVerticalPinnedGrid(tab) {
|
||||||
return (
|
return (
|
||||||
this.verticalMode &&
|
this.verticalMode &&
|
||||||
|
@ -266,7 +274,7 @@ index 67bba60cfc21b940f263e1eb26b8b5429355660f..0d493a544d20e75e6e847d93fad1e113
|
||||||
!this.expandOnHover
|
!this.expandOnHover
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -1770,7 +1818,7 @@
|
@@ -1770,7 +1819,7 @@
|
||||||
|
|
||||||
if (node == null) {
|
if (node == null) {
|
||||||
// We have a container for non-tab elements at the end of the scrollbox.
|
// We have a container for non-tab elements at the end of the scrollbox.
|
||||||
|
@ -275,7 +283,7 @@ index 67bba60cfc21b940f263e1eb26b8b5429355660f..0d493a544d20e75e6e847d93fad1e113
|
||||||
}
|
}
|
||||||
|
|
||||||
node.before(tab);
|
node.before(tab);
|
||||||
@@ -1865,7 +1913,7 @@
|
@@ -1865,7 +1914,7 @@
|
||||||
// There are separate "new tab" buttons for horizontal tabs toolbar, vertical tabs and
|
// There are separate "new tab" buttons for horizontal tabs toolbar, vertical tabs and
|
||||||
// for when the tab strip is overflowed (which is shared by vertical and horizontal tabs);
|
// for when the tab strip is overflowed (which is shared by vertical and horizontal tabs);
|
||||||
// Attach the long click popup to all of them.
|
// Attach the long click popup to all of them.
|
||||||
|
@ -284,7 +292,7 @@ index 67bba60cfc21b940f263e1eb26b8b5429355660f..0d493a544d20e75e6e847d93fad1e113
|
||||||
const newTab2 = this.newTabButton;
|
const newTab2 = this.newTabButton;
|
||||||
const newTabVertical = document.getElementById(
|
const newTabVertical = document.getElementById(
|
||||||
"vertical-tabs-newtab-button"
|
"vertical-tabs-newtab-button"
|
||||||
@@ -1960,10 +2008,12 @@
|
@@ -1960,10 +2009,12 @@
|
||||||
|
|
||||||
_handleTabSelect(aInstant) {
|
_handleTabSelect(aInstant) {
|
||||||
let selectedTab = this.selectedItem;
|
let selectedTab = this.selectedItem;
|
||||||
|
@ -297,7 +305,7 @@ index 67bba60cfc21b940f263e1eb26b8b5429355660f..0d493a544d20e75e6e847d93fad1e113
|
||||||
selectedTab._notselectedsinceload = false;
|
selectedTab._notselectedsinceload = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2136,6 +2186,7 @@
|
@@ -2136,6 +2187,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
_positionPinnedTabs() {
|
_positionPinnedTabs() {
|
||||||
|
@ -305,7 +313,7 @@ index 67bba60cfc21b940f263e1eb26b8b5429355660f..0d493a544d20e75e6e847d93fad1e113
|
||||||
let tabs = this.visibleTabs;
|
let tabs = this.visibleTabs;
|
||||||
let numPinned = gBrowser.pinnedTabCount;
|
let numPinned = gBrowser.pinnedTabCount;
|
||||||
let absPositionHorizontalTabs =
|
let absPositionHorizontalTabs =
|
||||||
@@ -2210,7 +2261,7 @@
|
@@ -2210,7 +2262,7 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -314,7 +322,7 @@ index 67bba60cfc21b940f263e1eb26b8b5429355660f..0d493a544d20e75e6e847d93fad1e113
|
||||||
|
|
||||||
let directionX = screenX > dragData.animLastScreenX;
|
let directionX = screenX > dragData.animLastScreenX;
|
||||||
let directionY = screenY > dragData.animLastScreenY;
|
let directionY = screenY > dragData.animLastScreenY;
|
||||||
@@ -2219,6 +2270,8 @@
|
@@ -2219,6 +2271,8 @@
|
||||||
|
|
||||||
let { width: tabWidth, height: tabHeight } =
|
let { width: tabWidth, height: tabHeight } =
|
||||||
draggedTab.getBoundingClientRect();
|
draggedTab.getBoundingClientRect();
|
||||||
|
@ -323,7 +331,7 @@ index 67bba60cfc21b940f263e1eb26b8b5429355660f..0d493a544d20e75e6e847d93fad1e113
|
||||||
let shiftSizeX = tabWidth * movingTabs.length;
|
let shiftSizeX = tabWidth * movingTabs.length;
|
||||||
let shiftSizeY = tabHeight;
|
let shiftSizeY = tabHeight;
|
||||||
dragData.tabWidth = tabWidth;
|
dragData.tabWidth = tabWidth;
|
||||||
@@ -2248,7 +2301,7 @@
|
@@ -2248,7 +2302,7 @@
|
||||||
let translateX = screenX - dragData.screenX;
|
let translateX = screenX - dragData.screenX;
|
||||||
let translateY = screenY - dragData.screenY;
|
let translateY = screenY - dragData.screenY;
|
||||||
translateY +=
|
translateY +=
|
||||||
|
@ -332,7 +340,7 @@ index 67bba60cfc21b940f263e1eb26b8b5429355660f..0d493a544d20e75e6e847d93fad1e113
|
||||||
let firstBoundX = firstTabInRow.screenX - firstMovingTabScreenX;
|
let firstBoundX = firstTabInRow.screenX - firstMovingTabScreenX;
|
||||||
let firstBoundY = firstTabInRow.screenY - firstMovingTabScreenY;
|
let firstBoundY = firstTabInRow.screenY - firstMovingTabScreenY;
|
||||||
let lastBoundX =
|
let lastBoundX =
|
||||||
@@ -2394,12 +2447,16 @@
|
@@ -2394,12 +2448,16 @@
|
||||||
|
|
||||||
this.#clearDragOverCreateGroupTimer();
|
this.#clearDragOverCreateGroupTimer();
|
||||||
|
|
||||||
|
@ -353,7 +361,7 @@ index 67bba60cfc21b940f263e1eb26b8b5429355660f..0d493a544d20e75e6e847d93fad1e113
|
||||||
|
|
||||||
if (this.#rtlMode) {
|
if (this.#rtlMode) {
|
||||||
tabs.reverse();
|
tabs.reverse();
|
||||||
@@ -2413,7 +2470,7 @@
|
@@ -2413,7 +2471,7 @@
|
||||||
let size = this.verticalMode ? "height" : "width";
|
let size = this.verticalMode ? "height" : "width";
|
||||||
let translateAxis = this.verticalMode ? "translateY" : "translateX";
|
let translateAxis = this.verticalMode ? "translateY" : "translateX";
|
||||||
let scrollDirection = this.verticalMode ? "scrollTop" : "scrollLeft";
|
let scrollDirection = this.verticalMode ? "scrollTop" : "scrollLeft";
|
||||||
|
@ -362,7 +370,7 @@ index 67bba60cfc21b940f263e1eb26b8b5429355660f..0d493a544d20e75e6e847d93fad1e113
|
||||||
let translateX = event.screenX - dragData.screenX;
|
let translateX = event.screenX - dragData.screenX;
|
||||||
let translateY = event.screenY - dragData.screenY;
|
let translateY = event.screenY - dragData.screenY;
|
||||||
|
|
||||||
@@ -2427,12 +2484,21 @@
|
@@ -2427,12 +2485,21 @@
|
||||||
let lastTab = tabs.at(-1);
|
let lastTab = tabs.at(-1);
|
||||||
let lastMovingTab = movingTabs.at(-1);
|
let lastMovingTab = movingTabs.at(-1);
|
||||||
let firstMovingTab = movingTabs[0];
|
let firstMovingTab = movingTabs[0];
|
||||||
|
@ -385,7 +393,7 @@ index 67bba60cfc21b940f263e1eb26b8b5429355660f..0d493a544d20e75e6e847d93fad1e113
|
||||||
translate +=
|
translate +=
|
||||||
this.arrowScrollbox.scrollbox[scrollDirection] - dragData.scrollPos;
|
this.arrowScrollbox.scrollbox[scrollDirection] - dragData.scrollPos;
|
||||||
} else if (isPinned && this.verticalMode) {
|
} else if (isPinned && this.verticalMode) {
|
||||||
@@ -2451,6 +2517,9 @@
|
@@ -2451,6 +2518,9 @@
|
||||||
// Shift the `.tab-group-label-container` to shift the label element.
|
// Shift the `.tab-group-label-container` to shift the label element.
|
||||||
item = item.parentElement;
|
item = item.parentElement;
|
||||||
}
|
}
|
||||||
|
@ -395,7 +403,7 @@ index 67bba60cfc21b940f263e1eb26b8b5429355660f..0d493a544d20e75e6e847d93fad1e113
|
||||||
item.style.transform = `${translateAxis}(${translate}px)`;
|
item.style.transform = `${translateAxis}(${translate}px)`;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2588,6 +2657,9 @@
|
@@ -2588,6 +2658,9 @@
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
let element = tabs[mid];
|
let element = tabs[mid];
|
||||||
|
@ -405,7 +413,7 @@ index 67bba60cfc21b940f263e1eb26b8b5429355660f..0d493a544d20e75e6e847d93fad1e113
|
||||||
let elementForSize = isTabGroupLabel(element)
|
let elementForSize = isTabGroupLabel(element)
|
||||||
? element.parentElement
|
? element.parentElement
|
||||||
: element;
|
: element;
|
||||||
@@ -2664,7 +2736,7 @@
|
@@ -2664,7 +2737,7 @@
|
||||||
let shouldCreateGroupOnDrop;
|
let shouldCreateGroupOnDrop;
|
||||||
let dropBefore;
|
let dropBefore;
|
||||||
if (dropElement) {
|
if (dropElement) {
|
||||||
|
@ -414,7 +422,7 @@ index 67bba60cfc21b940f263e1eb26b8b5429355660f..0d493a544d20e75e6e847d93fad1e113
|
||||||
? dropElement.parentElement
|
? dropElement.parentElement
|
||||||
: dropElement;
|
: dropElement;
|
||||||
|
|
||||||
@@ -2726,12 +2798,12 @@
|
@@ -2726,12 +2799,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -429,7 +437,7 @@ index 67bba60cfc21b940f263e1eb26b8b5429355660f..0d493a544d20e75e6e847d93fad1e113
|
||||||
isTab(dropElement) &&
|
isTab(dropElement) &&
|
||||||
!dropElement?.group &&
|
!dropElement?.group &&
|
||||||
overlapPercent > dragOverGroupingThreshold;
|
overlapPercent > dragOverGroupingThreshold;
|
||||||
@@ -2773,7 +2845,7 @@
|
@@ -2773,7 +2846,7 @@
|
||||||
// Dropping right before the tab group.
|
// Dropping right before the tab group.
|
||||||
dropElement = dropElementGroup;
|
dropElement = dropElementGroup;
|
||||||
colorCode = undefined;
|
colorCode = undefined;
|
||||||
|
@ -438,7 +446,7 @@ index 67bba60cfc21b940f263e1eb26b8b5429355660f..0d493a544d20e75e6e847d93fad1e113
|
||||||
// Dropping right after the collapsed tab group.
|
// Dropping right after the collapsed tab group.
|
||||||
dropElement = dropElementGroup;
|
dropElement = dropElementGroup;
|
||||||
colorCode = undefined;
|
colorCode = undefined;
|
||||||
@@ -2803,7 +2875,7 @@
|
@@ -2803,7 +2876,7 @@
|
||||||
// Shift background tabs to leave a gap where the dragged tab
|
// Shift background tabs to leave a gap where the dragged tab
|
||||||
// would currently be dropped.
|
// would currently be dropped.
|
||||||
for (let item of tabs) {
|
for (let item of tabs) {
|
||||||
|
@ -447,7 +455,7 @@ index 67bba60cfc21b940f263e1eb26b8b5429355660f..0d493a544d20e75e6e847d93fad1e113
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2812,6 +2884,9 @@
|
@@ -2812,6 +2885,9 @@
|
||||||
if (isTabGroupLabel(item)) {
|
if (isTabGroupLabel(item)) {
|
||||||
// Shift the `.tab-group-label-container` to shift the label element.
|
// Shift the `.tab-group-label-container` to shift the label element.
|
||||||
item = item.parentElement;
|
item = item.parentElement;
|
||||||
|
@ -457,7 +465,7 @@ index 67bba60cfc21b940f263e1eb26b8b5429355660f..0d493a544d20e75e6e847d93fad1e113
|
||||||
}
|
}
|
||||||
item.style.transform = transform;
|
item.style.transform = transform;
|
||||||
}
|
}
|
||||||
@@ -2864,8 +2939,9 @@
|
@@ -2864,8 +2940,9 @@
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -469,7 +477,7 @@ index 67bba60cfc21b940f263e1eb26b8b5429355660f..0d493a544d20e75e6e847d93fad1e113
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2877,6 +2953,12 @@
|
@@ -2877,6 +2954,12 @@
|
||||||
item = item.parentElement;
|
item = item.parentElement;
|
||||||
}
|
}
|
||||||
item.style.transform = "";
|
item.style.transform = "";
|
||||||
|
@ -482,7 +490,7 @@ index 67bba60cfc21b940f263e1eb26b8b5429355660f..0d493a544d20e75e6e847d93fad1e113
|
||||||
item.removeAttribute("dragover-createGroup");
|
item.removeAttribute("dragover-createGroup");
|
||||||
}
|
}
|
||||||
this.removeAttribute("movingtab-createGroup");
|
this.removeAttribute("movingtab-createGroup");
|
||||||
@@ -2923,7 +3005,7 @@
|
@@ -2923,7 +3006,7 @@
|
||||||
let postTransitionCleanup = () => {
|
let postTransitionCleanup = () => {
|
||||||
movingTab._moveTogetherSelectedTabsData.animate = false;
|
movingTab._moveTogetherSelectedTabsData.animate = false;
|
||||||
};
|
};
|
||||||
|
@ -491,7 +499,7 @@ index 67bba60cfc21b940f263e1eb26b8b5429355660f..0d493a544d20e75e6e847d93fad1e113
|
||||||
postTransitionCleanup();
|
postTransitionCleanup();
|
||||||
} else {
|
} else {
|
||||||
let onTransitionEnd = transitionendEvent => {
|
let onTransitionEnd = transitionendEvent => {
|
||||||
@@ -3096,7 +3178,7 @@
|
@@ -3096,7 +3179,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
_notifyBackgroundTab(aTab) {
|
_notifyBackgroundTab(aTab) {
|
||||||
|
@ -500,7 +508,7 @@ index 67bba60cfc21b940f263e1eb26b8b5429355660f..0d493a544d20e75e6e847d93fad1e113
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3222,6 +3304,9 @@
|
@@ -3222,6 +3305,9 @@
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
diff --git a/widget/cocoa/nsCocoaWindow.mm b/widget/cocoa/nsCocoaWindow.mm
|
diff --git a/widget/cocoa/nsCocoaWindow.mm b/widget/cocoa/nsCocoaWindow.mm
|
||||||
index c4627621344d35081f11a7b0e03d02eca2097609..d2e5fe429aaac8b701a03380a67f4ea978d566b3 100644
|
index c4627621344d35081f11a7b0e03d02eca2097609..709a0dbfe46daa4148a423242c63598ba6904fde 100644
|
||||||
--- a/widget/cocoa/nsCocoaWindow.mm
|
--- a/widget/cocoa/nsCocoaWindow.mm
|
||||||
+++ b/widget/cocoa/nsCocoaWindow.mm
|
+++ b/widget/cocoa/nsCocoaWindow.mm
|
||||||
@@ -7376,7 +7376,7 @@ - (id)initWithContentRect:(NSRect)aContentRect
|
@@ -7376,7 +7376,7 @@ - (id)initWithContentRect:(NSRect)aContentRect
|
||||||
|
@ -7,7 +7,7 @@ index c4627621344d35081f11a7b0e03d02eca2097609..d2e5fe429aaac8b701a03380a67f4ea9
|
||||||
// Returns an autoreleased NSImage.
|
// Returns an autoreleased NSImage.
|
||||||
static NSImage* GetMenuMaskImage() {
|
static NSImage* GetMenuMaskImage() {
|
||||||
- const CGFloat radius = 6.0f;
|
- const CGFloat radius = 6.0f;
|
||||||
+ const CGFloat radius = 14.0f;
|
+ const CGFloat radius = 11.0f;
|
||||||
const NSSize maskSize = {radius * 3.0f, radius * 3.0f};
|
const NSSize maskSize = {radius * 3.0f, radius * 3.0f};
|
||||||
NSImage* maskImage = [NSImage imageWithSize:maskSize
|
NSImage* maskImage = [NSImage imageWithSize:maskSize
|
||||||
flipped:FALSE
|
flipped:FALSE
|
||||||
|
|
|
@ -46,7 +46,10 @@
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
|
|
||||||
isolation: isolate;
|
isolation: isolate;
|
||||||
background: var(--zen-themed-toolbar-bg-transparent);
|
|
||||||
|
:root[zen-should-be-dark-mode] {
|
||||||
|
background: var(--zen-themed-toolbar-bg-transparent);
|
||||||
|
}
|
||||||
|
|
||||||
&::after,
|
&::after,
|
||||||
&::before {
|
&::before {
|
||||||
|
|
|
@ -64,7 +64,7 @@ panel[type='arrow'] {
|
||||||
--panel-border-radius: 6px;
|
--panel-border-radius: 6px;
|
||||||
|
|
||||||
&::part(content) {
|
&::part(content) {
|
||||||
background-color: light-dark(rgba(255, 255, 255, 0.2), rgba(0, 0, 0, 0.2)) !important;
|
background-color: transparent !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -155,13 +155,13 @@ var gZenCompactModeManager = {
|
||||||
},
|
},
|
||||||
|
|
||||||
updateCompactModeContext(isSingleToolbar) {
|
updateCompactModeContext(isSingleToolbar) {
|
||||||
const IDs = [
|
const menuitem = document.getElementById('zen-context-menu-compact-mode-toggle');
|
||||||
'zen-context-menu-compact-mode-hide-sidebar',
|
const menu = document.getElementById('zen-context-menu-compact-mode');
|
||||||
'zen-context-menu-compact-mode-hide-toolbar',
|
menu.setAttribute('hidden', isSingleToolbar);
|
||||||
'zen-context-menu-compact-mode-hide-both',
|
if (isSingleToolbar) {
|
||||||
];
|
menu.before(menuitem);
|
||||||
for (let id of IDs) {
|
} else {
|
||||||
document.getElementById(id).disabled = isSingleToolbar;
|
menu.querySelector('menupopup').prepend(menuitem);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -1110,9 +1110,7 @@
|
||||||
|
|
||||||
const rotation = -45; // TODO: Detect rotation based on the accent color
|
const rotation = -45; // TODO: Detect rotation based on the accent color
|
||||||
if (themedColors.length === 0) {
|
if (themedColors.length === 0) {
|
||||||
return forToolbar
|
return forToolbar ? this.getToolbarModifiedBase() : 'transparent';
|
||||||
? this.getToolbarModifiedBase()
|
|
||||||
: 'var(--zen-themed-toolbar-bg-transparent)';
|
|
||||||
} else if (themedColors.length === 1) {
|
} else if (themedColors.length === 1) {
|
||||||
return this.getSingleRGBColor(themedColors[0], forToolbar);
|
return this.getSingleRGBColor(themedColors[0], forToolbar);
|
||||||
} else if (themedColors.length === 2) {
|
} else if (themedColors.length === 2) {
|
||||||
|
@ -1282,13 +1280,16 @@
|
||||||
|
|
||||||
getMostDominantColor(allColors) {
|
getMostDominantColor(allColors) {
|
||||||
const dominantColor = this.getPrimaryColor(allColors);
|
const dominantColor = this.getPrimaryColor(allColors);
|
||||||
|
if (!dominantColor) {
|
||||||
|
return this.hexToRgb(this.getNativeAccentColor());
|
||||||
|
}
|
||||||
const result = this.pSBC(
|
const result = this.pSBC(
|
||||||
this.isDarkMode ? 0.2 : -0.5,
|
this.isDarkMode ? 0.2 : -0.5,
|
||||||
`rgb(${dominantColor[0]}, ${dominantColor[1]}, ${dominantColor[2]})`
|
`rgb(${dominantColor[0]}, ${dominantColor[1]}, ${dominantColor[2]})`
|
||||||
);
|
);
|
||||||
const color = result?.match(/\d+/g)?.map(Number);
|
const color = result?.match(/\d+/g)?.map(Number);
|
||||||
if (!color || color.length !== 3) {
|
if (!color || color.length !== 3) {
|
||||||
return this.getNativeAccentColor();
|
return this.hexToRgb(this.getNativeAccentColor());
|
||||||
}
|
}
|
||||||
return color;
|
return color;
|
||||||
}
|
}
|
||||||
|
@ -1492,7 +1493,7 @@
|
||||||
: `rgb(${dominantColor[0]}, ${dominantColor[1]}, ${dominantColor[2]})`
|
: `rgb(${dominantColor[0]}, ${dominantColor[1]}, ${dominantColor[2]})`
|
||||||
);
|
);
|
||||||
let isDarkMode = this.isDarkMode;
|
let isDarkMode = this.isDarkMode;
|
||||||
if (dominantColor !== this.hexToRgb(this.getNativeAccentColor())) {
|
if (dominantColor.toString() !== this.hexToRgb(this.getNativeAccentColor()).toString()) {
|
||||||
isDarkMode = browser.gZenThemePicker.shouldBeDarkMode(dominantColor);
|
isDarkMode = browser.gZenThemePicker.shouldBeDarkMode(dominantColor);
|
||||||
browser.document.documentElement.setAttribute('zen-should-be-dark-mode', isDarkMode);
|
browser.document.documentElement.setAttribute('zen-should-be-dark-mode', isDarkMode);
|
||||||
} else {
|
} else {
|
||||||
|
@ -1558,7 +1559,7 @@
|
||||||
return primaryColor.c;
|
return primaryColor.c;
|
||||||
}
|
}
|
||||||
if (colors.length === 0) {
|
if (colors.length === 0) {
|
||||||
return this.hexToRgb(this.getNativeAccentColor());
|
return undefined;
|
||||||
}
|
}
|
||||||
// Get the middle color
|
// Get the middle color
|
||||||
return colors[Math.floor(colors.length / 2)].c;
|
return colors[Math.floor(colors.length / 2)].c;
|
||||||
|
|
|
@ -119,7 +119,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const element of ZenWorkspaceCreation.elementsToDisable) {
|
for (const element of nsZenWorkspaceCreation.elementsToDisable) {
|
||||||
const el = document.getElementById(element);
|
const el = document.getElementById(element);
|
||||||
if (el) {
|
if (el) {
|
||||||
el.setAttribute('disabled', 'true');
|
el.setAttribute('disabled', 'true');
|
||||||
|
|
|
@ -2840,4 +2840,19 @@ var gZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
updateOverflowingTabs() {
|
||||||
|
if (!this._hasInitializedTabsStrip) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const currentWorkspaceStrip = this.workspaceElement(this.activeWorkspace);
|
||||||
|
if (!currentWorkspaceStrip) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (currentWorkspaceStrip.overflows) {
|
||||||
|
gBrowser.tabContainer.setAttribute('overflow', 'true');
|
||||||
|
} else {
|
||||||
|
gBrowser.tabContainer.removeAttribute('overflow');
|
||||||
|
}
|
||||||
|
}
|
||||||
})();
|
})();
|
||||||
|
|
|
@ -210,6 +210,7 @@
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
min-width: calc(100% + 2rem);
|
min-width: calc(100% + 2rem);
|
||||||
scale: 1.2;
|
scale: 1.2;
|
||||||
|
margin-left: 4px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -298,6 +299,7 @@
|
||||||
transform: translate(-50%, -50%);
|
transform: translate(-50%, -50%);
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
|
font-size: small;
|
||||||
|
|
||||||
&[hidden] {
|
&[hidden] {
|
||||||
display: none;
|
display: none;
|
||||||
|
@ -437,3 +439,13 @@
|
||||||
max-height: 28px;
|
max-height: 28px;
|
||||||
margin: 0 !important;
|
margin: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:root:not([zen-should-be-dark-mode]) {
|
||||||
|
#PanelUI-zen-gradient-generator-opacity {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#PanelUI-zen-gradient-slider-wave svg path {
|
||||||
|
stroke: dimgray !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -34,7 +34,8 @@
|
||||||
|
|
||||||
& toolbarbutton {
|
& toolbarbutton {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
width: 25px;
|
width: 28px;
|
||||||
|
height: 28px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue