feat: Imrove border spacing for no-separation in compact mode and other small tweaks, b=no-bug, c=compact-mode, folders, workspaces

This commit is contained in:
Mr. M
2025-08-18 20:09:07 +02:00
parent e06402f468
commit d216114364
6 changed files with 35 additions and 18 deletions

View File

@@ -23,7 +23,7 @@
value: true value: true
- name: browser.urlbar.maxRichResults - name: browser.urlbar.maxRichResults
value: 7 value: 5
# Enable private suggestions # Enable private suggestions
- name: browser.search.suggest.enabled - name: browser.search.suggest.enabled

View File

@@ -1,5 +1,5 @@
diff --git a/browser/themes/shared/urlbarView.css b/browser/themes/shared/urlbarView.css diff --git a/browser/themes/shared/urlbarView.css b/browser/themes/shared/urlbarView.css
index 428ce749239be2a54c86e0feff123772d1a1d697..9f33c10add207c7971c07743147a458e19b469bb 100644 index 428ce749239be2a54c86e0feff123772d1a1d697..bfef48f520dac8968f79d06cbef2e5a047ded748 100644
--- a/browser/themes/shared/urlbarView.css --- a/browser/themes/shared/urlbarView.css
+++ b/browser/themes/shared/urlbarView.css +++ b/browser/themes/shared/urlbarView.css
@@ -20,7 +20,7 @@ @@ -20,7 +20,7 @@
@@ -11,3 +11,11 @@ index 428ce749239be2a54c86e0feff123772d1a1d697..9f33c10add207c7971c07743147a458e
--urlbarView-row-gutter: 2px; --urlbarView-row-gutter: 2px;
--urlbarView-item-inline-padding: var(--urlbar-icon-padding); --urlbarView-item-inline-padding: var(--urlbar-icon-padding);
--urlbarView-item-block-padding: 6px; --urlbarView-item-block-padding: 6px;
@@ -168,7 +168,6 @@
min-height: 32px;
}
:root[uidensity="touch"] & {
- padding-block: 11px;
}
}

View File

@@ -50,6 +50,9 @@
#navigator-toolbox { #navigator-toolbox {
--zen-toolbox-max-width: 74px !important; --zen-toolbox-max-width: 74px !important;
--zen-compact-float: var(--zen-element-separation); --zen-compact-float: var(--zen-element-separation);
:root[zen-no-padding='true'] & {
--zen-compact-float: 10px;
}
/* Initial padding for when we are animating */ /* Initial padding for when we are animating */
padding: 0 0 0 var(--zen-toolbox-padding) !important; padding: 0 0 0 var(--zen-toolbox-padding) !important;
@@ -62,14 +65,14 @@
right 0.15s ease, right 0.15s ease,
visibility 0.15s ease; visibility 0.15s ease;
top: 0; top: 0;
bottom: var(--zen-element-separation); bottom: var(--zen-compact-float);
padding: 0 var(--zen-compact-float) !important; padding: 0 var(--zen-compact-float) !important;
:root[zen-single-toolbar='true'] & { :root[zen-single-toolbar='true'] & {
top: calc(var(--zen-element-separation) / 2); top: calc(var(--zen-compact-float) / 2);
height: calc(100% - var(--zen-element-separation)); height: calc(100% - var(--zen-compact-float));
} }
:root:not([zen-single-toolbar='true']) & { :root:not([zen-single-toolbar='true']) & {
top: calc(var(--zen-element-separation) / -2); top: calc(var(--zen-compact-float) / -2);
height: calc(100% - var(--zen-toolbar-height)); height: calc(100% - var(--zen-toolbar-height));
@media -moz-pref('zen.view.compact.hide-toolbar') { @media -moz-pref('zen.view.compact.hide-toolbar') {
height: 100%; height: 100%;
@@ -289,10 +292,6 @@
1.003423 100% 1.003423 100%
); );
--zen-compact-mode-time: 0.25s; --zen-compact-mode-time: 0.25s;
:root[zen-no-padding='true'] & {
--zen-compact-mode-func: ease-out;
--zen-compact-mode-time: 0.1s;
}
transition: transition:
left var(--zen-compact-mode-time) var(--zen-compact-mode-func), left var(--zen-compact-mode-time) var(--zen-compact-mode-func),
right var(--zen-compact-mode-time) var(--zen-compact-mode-func); right var(--zen-compact-mode-time) var(--zen-compact-mode-func);
@@ -303,9 +302,9 @@
visibility: visible; visibility: visible;
} }
left: calc(var(--zen-element-separation) / -2 - 1px); left: calc(var(--zen-compact-float) / -2);
:root[zen-right-side='true'] & { :root[zen-right-side='true'] & {
right: calc(var(--zen-element-separation) / -2 - 1px); right: calc(var(--zen-compact-float) / -2);
left: auto; left: auto;
} }
} }

View File

@@ -42,6 +42,8 @@
#foldersEnabled = false; #foldersEnabled = false;
#folderAnimCache = new Map(); #folderAnimCache = new Map();
#animationCount = 0;
init() { init() {
this.#foldersEnabled = !gZenWorkspaces.privateWindowOrDisabled; this.#foldersEnabled = !gZenWorkspaces.privateWindowOrDisabled;
@@ -373,11 +375,14 @@
{ {
marginTop: [0, -(heightUntilSelected + 4 * !selectedItem)], marginTop: [0, -(heightUntilSelected + 4 * !selectedItem)],
}, },
{ duration: 0.15, ease: 'easeInOut' } { duration: 0.1, ease: 'easeInOut' }
) )
); );
this.#animationCount += 1;
await Promise.all(animations); await Promise.all(animations);
if (!selectedItem) tabsContainer.setAttribute('hidden', true); // Prevent hiding if we spam the group animations
this.#animationCount -= 1;
if (!selectedItem && !this.#animationCount) tabsContainer.setAttribute('hidden', true);
} }
async #onTabGroupExpand(event) { async #onTabGroupExpand(event) {
@@ -452,12 +457,17 @@
marginTop: 0, marginTop: 0,
}, },
{ {
duration: 0.15, duration: 0.1,
ease: 'linear', ease: 'linear',
} }
) )
); );
this.#animationCount += 1;
await Promise.all(animations); await Promise.all(animations);
this.#animationCount -= 1;
if (this.#animationCount) {
return;
}
tabsContainer.style.overflow = ''; tabsContainer.style.overflow = '';
groupItems.map((item) => { groupItems.map((item) => {
// Cleanup just in case // Cleanup just in case

View File

@@ -182,7 +182,7 @@ zen-folder {
flex-direction: column; flex-direction: column;
--zen-folder-behind-bgcolor: light-dark( --zen-folder-behind-bgcolor: light-dark(
color-mix(in srgb, var(--zen-primary-color) 85%, white), color-mix(in srgb, var(--zen-primary-color) 85%, white),
color-mix(in srgb, var(--zen-primary-color) 75%, white) color-mix(in srgb, var(--zen-primary-color) 75%, black)
); );
--zen-folder-front-bgcolor: light-dark( --zen-folder-front-bgcolor: light-dark(
color-mix(in srgb, var(--zen-primary-color), white 70%), color-mix(in srgb, var(--zen-primary-color), white 70%),
@@ -244,7 +244,7 @@ zen-folder {
--tab-group-color: transparent !important; --tab-group-color: transparent !important;
padding-block-end: 0 !important; padding-block-end: 0 !important;
margin: 0 !important; margin: 0 !important;
height: 40px; height: calc(var(--tab-block-margin) * 2 + var(--tab-min-height));
padding-inline: var(--tab-group-label-padding); padding-inline: var(--tab-group-label-padding);
align-items: center; align-items: center;
font-weight: 600; font-weight: 600;

View File

@@ -1143,7 +1143,7 @@
return forToolbar return forToolbar
? this.getToolbarModifiedBase() ? this.getToolbarModifiedBase()
: this.isDarkMode : this.isDarkMode
? 'linear-gradient(-45deg, rgba(255, 255, 255, 0.01), rgba(0, 0, 0, 0.4))' ? 'rgba(0, 0, 0, 0.4)'
: 'transparent'; : 'transparent';
} else if (themedColors.length === 1) { } else if (themedColors.length === 1) {
return this.getSingleRGBColor(themedColors[0], forToolbar); return this.getSingleRGBColor(themedColors[0], forToolbar);