feat: Small quality fixes, b=no-bug, c=common, compact-mode, folders, kbs, split-view

This commit is contained in:
Mr. M
2025-09-12 15:00:47 +02:00
parent 171da8bc68
commit 53241eb1be
9 changed files with 50 additions and 13 deletions

View File

@@ -33,7 +33,7 @@
value: true value: true
- name: zen.theme.styled-status-panel - name: zen.theme.styled-status-panel
value: false value: true
# ==== Mark: border radius ==== # ==== Mark: border radius ====

View File

@@ -880,7 +880,7 @@ var gZenCKSSettings = {
const labelValue = zenMissingKeyboardShortcutL10n[keyID] ?? l10nID; const labelValue = zenMissingKeyboardShortcutL10n[keyID] ?? l10nID;
if (zenIgnoreKeyboardShortcutL10n.includes(labelValue)) { if (zenIgnoreKeyboardShortcutL10n.includes(labelValue) || shortcut.shouldBeEmpty) {
continue; continue;
} }

View File

@@ -1,5 +1,5 @@
diff --git a/toolkit/themes/shared/in-content/common-shared.css b/toolkit/themes/shared/in-content/common-shared.css diff --git a/toolkit/themes/shared/in-content/common-shared.css b/toolkit/themes/shared/in-content/common-shared.css
index c45d48dc3106a2dc36f6dd704ebb2721817f016e..cfaf394d8ada7f4256037ead08fd338b7e28df32 100644 index c45d48dc3106a2dc36f6dd704ebb2721817f016e..71291ab50b73872473190537fe2ce7a95a57aa12 100644
--- a/toolkit/themes/shared/in-content/common-shared.css --- a/toolkit/themes/shared/in-content/common-shared.css
+++ b/toolkit/themes/shared/in-content/common-shared.css +++ b/toolkit/themes/shared/in-content/common-shared.css
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
@@ -11,6 +11,15 @@ index c45d48dc3106a2dc36f6dd704ebb2721817f016e..cfaf394d8ada7f4256037ead08fd338b
@namespace html "http://www.w3.org/1999/xhtml"; @namespace html "http://www.w3.org/1999/xhtml";
@namespace xul "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; @namespace xul "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
@@ -69,7 +69,7 @@
* this in forced colors mode, as we should be using system colours then.
*/
:root[dialogroot] {
- --background-color-canvas: #42414d;
+ --background-color-canvas: var(--zen-dialog-background);
}
}
@@ -708,7 +708,7 @@ html|*#categories[last-input-type="mouse"] > html|button.category:focus-visible @@ -708,7 +708,7 @@ html|*#categories[last-input-type="mouse"] > html|button.category:focus-visible
fill-opacity: 1; fill-opacity: 1;
} }

View File

@@ -256,3 +256,8 @@ body > #confetti {
} }
} }
} }
/* Customizable modes */
#customization-container {
--toolbar-bgcolor: var(--zen-dialog-background);
}

View File

@@ -533,6 +533,12 @@ var gZenCompactModeManager = {
for (let i = 0; i < this.hoverableElements.length; i++) { for (let i = 0; i < this.hoverableElements.length; i++) {
let target = this.hoverableElements[i].element; let target = this.hoverableElements[i].element;
// Add the attribute on startup if the mouse is already over the element
if (target.matches(':hover')) {
target.setAttribute('zen-has-hover', 'true');
}
const onEnter = (event) => { const onEnter = (event) => {
setTimeout(() => { setTimeout(() => {
if (event.type === 'mouseenter' && !event.target.matches(':hover')) return; if (event.type === 'mouseenter' && !event.target.matches(':hover')) return;

View File

@@ -19,6 +19,8 @@ tab-group[split-view-group] {
transparent 40% transparent 40%
); );
--tab-collapsed-background-width: none;
:root[zen-sidebar-expanded='true'] & { :root[zen-sidebar-expanded='true'] & {
margin-inline-start: var(--zen-folder-indent) !important; margin-inline-start: var(--zen-folder-indent) !important;
} }

View File

@@ -296,6 +296,7 @@ class KeyShortcut {
#disabled = false; #disabled = false;
#reserved = false; #reserved = false;
#internal = false; #internal = false;
#shouldBeEmpty = false;
constructor( constructor(
id, id,
@@ -396,6 +397,17 @@ class KeyShortcut {
return `zen-${id}`; return `zen-${id}`;
} }
set shouldBeEmpty(value) {
this.#shouldBeEmpty = value;
if (value) {
this.clearKeybind();
}
}
get shouldBeEmpty() {
return this.#shouldBeEmpty;
}
toXHTMLElement(window) { toXHTMLElement(window) {
let key = window.document.createXULElement('key'); let key = window.document.createXULElement('key');
return this.replaceWithChild(key); return this.replaceWithChild(key);
@@ -844,12 +856,13 @@ class nsZenKeyboardShortcutsVersioner {
// Hard-remove deprecated or conflicting defaults regardless of version // Hard-remove deprecated or conflicting defaults regardless of version
// - Remove the built-in "Open File" keybinding; menu item remains available // - Remove the built-in "Open File" keybinding; menu item remains available
// - Remove default "Bookmark All Tabs" keybinding (Ctrl+Shift+D) to avoid conflict // - Remove default "Bookmark All Tabs" keybinding (Ctrl+Shift+D) to avoid conflict
out = out.filter( // - Remove "Stop" keybinding to avoid conflict with Firefox's built-in binding
(shortcut) => const shouldBeEmptyShortcuts = ['openFileKb', 'bookmarkAllTabsKb', 'key_stop'];
shortcut.getAction?.() !== 'Browser:OpenFile' && for (let shortcut of out) {
shortcut.getID?.() !== 'bookmarkAllTabsKb' && if (shouldBeEmptyShortcuts.includes(shortcut.getID?.())) {
shortcut.getID?.() !== 'key_stop' shortcut.shouldBeEmpty = true;
); }
}
return out; return out;
} }

View File

@@ -332,7 +332,7 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature {
paddingLeft: 0, paddingLeft: 0,
}, },
{ {
duration: 0.08, duration: 0.1,
easing: 'ease-out', easing: 'ease-out',
} }
), ),
@@ -347,7 +347,7 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature {
: {}), : {}),
}, },
{ {
duration: 0.08, duration: 0.1,
easing: 'ease-out', easing: 'ease-out',
} }
), ),

View File

@@ -54,7 +54,7 @@
#tabbrowser-tabpanels[zen-split-view='true'] .browserSidebarContainer.deck-selected { #tabbrowser-tabpanels[zen-split-view='true'] .browserSidebarContainer.deck-selected {
&:not(.zen-glance-overlay) { &:not(.zen-glance-overlay) {
outline: 1px solid var(--zen-primary-color) !important; outline: 2px solid var(--zen-primary-color) !important;
} }
&.zen-glance-overlay { &.zen-glance-overlay {
@@ -181,10 +181,12 @@
#zen-split-view-fake-browser { #zen-split-view-fake-browser {
position: absolute; position: absolute;
height: 100%; height: 100%;
background: rgba(255, 255, 255, 0.1); border: 2px solid var(--zen-primary-color);
background: rgba(255, 255, 255, 0.01);
border-radius: var(--zen-native-inner-radius); border-radius: var(--zen-native-inner-radius);
box-shadow: var(--zen-big-shadow); box-shadow: var(--zen-big-shadow);
overflow: hidden; overflow: hidden;
will-change: width, margin-left;
&[side='right'] { &[side='right'] {
right: 0; right: 0;