Refactor tab button visibility and styles for improved UX

This commit is contained in:
mr. M
2025-01-29 17:07:42 +01:00
parent ebcd656e70
commit 0ab41a84bd
4 changed files with 23 additions and 8 deletions

View File

@@ -89,8 +89,8 @@ pref('zen.theme.gradient', true);
pref('zen.theme.essentials-favicon-bg', false);
pref('zen.tabs.show-newtab-vertical', true);
pref('zen.view.show-newtab-button-border-top', true);
pref('zen.view.show-newtab-button-top', false);
pref('zen.view.show-newtab-button-border-top', false);
pref('zen.view.show-newtab-button-top', true);
#ifdef MOZILLA_OFFICIAL
pref('zen.rice.api.url', 'https://share.zen-browser.app', locked);

View File

@@ -125,11 +125,15 @@
background: light-dark(rgba(1, 1, 1, 0.075), rgba(255, 255, 255, 0.1));
margin: 8px auto;
border: none;
min-height: 1px;
height: 1px;
max-height: 1px;
width: 98%;
transition: margin 0.2s ease-in-out, background 0.2s ease-in-out, max-height 0.2s ease-in-out;
#vertical-pinned-tabs-container:not(:has(tab:not([hidden]))) + & {
display: none;
#vertical-pinned-tabs-container:not(:has(tab:not([hidden]))) + &,
#tabbrowser-tabs:not(:has(#tabbrowser-arrowscrollbox tab:not([hidden]))) & {
max-height: 0;
margin: 0 auto;
}
}

View File

@@ -61,13 +61,15 @@
@media not (-moz-bool-pref: 'zen.workspaces.hide-deactivated-workspaces') {
& {
filter: grayscale(0.5);
transition: filter 0.2s;
filter: grayscale(1);
opacity: 0.5;
transition: filter 0.2s, opacity 0.2s;
}
&[active='true'],
&:hover {
filter: grayscale(0);
opacity: 1;
}
}
}

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
index ce68c339f35416574b7bc7ebf8c93378f653242b..394f76f94cc70314da37941062f8cf011a858e03 100644
index ce68c339f35416574b7bc7ebf8c93378f653242b..810b9c96bc26cc75e37c8b1ed6a61c1a51e123b8 100644
--- a/browser/components/tabbrowser/content/tabbrowser.js
+++ b/browser/components/tabbrowser/content/tabbrowser.js
@@ -409,11 +409,39 @@
@@ -199,6 +199,15 @@ index ce68c339f35416574b7bc7ebf8c93378f653242b..394f76f94cc70314da37941062f8cf01
tab.initialize();
}
@@ -3715,7 +3799,7 @@
// Ensure we have an index if one was not provided.
if (typeof index != "number") {
// Move the new tab after another tab if needed, to the end otherwise.
- index = Infinity;
+ index = Services.prefs.getBoolPref("zen.view.show-newtab-button-top") ? this.pinnedTabCount + 1 : Infinity;
if (
!bulkOrderedOpen &&
((openerTab &&
@@ -4070,6 +4154,10 @@
return;
}