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
- name: zen.theme.styled-status-panel
value: false
value: true
# ==== Mark: border radius ====

View File

@@ -880,7 +880,7 @@ var gZenCKSSettings = {
const labelValue = zenMissingKeyboardShortcutL10n[keyID] ?? l10nID;
if (zenIgnoreKeyboardShortcutL10n.includes(labelValue)) {
if (zenIgnoreKeyboardShortcutL10n.includes(labelValue) || shortcut.shouldBeEmpty) {
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
index c45d48dc3106a2dc36f6dd704ebb2721817f016e..cfaf394d8ada7f4256037ead08fd338b7e28df32 100644
index c45d48dc3106a2dc36f6dd704ebb2721817f016e..71291ab50b73872473190537fe2ce7a95a57aa12 100644
--- a/toolkit/themes/shared/in-content/common-shared.css
+++ b/toolkit/themes/shared/in-content/common-shared.css
@@ -4,7 +4,7 @@
@@ -11,6 +11,15 @@ index c45d48dc3106a2dc36f6dd704ebb2721817f016e..cfaf394d8ada7f4256037ead08fd338b
@namespace html "http://www.w3.org/1999/xhtml";
@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
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++) {
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) => {
setTimeout(() => {
if (event.type === 'mouseenter' && !event.target.matches(':hover')) return;

View File

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

View File

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

View File

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

View File

@@ -54,7 +54,7 @@
#tabbrowser-tabpanels[zen-split-view='true'] .browserSidebarContainer.deck-selected {
&:not(.zen-glance-overlay) {
outline: 1px solid var(--zen-primary-color) !important;
outline: 2px solid var(--zen-primary-color) !important;
}
&.zen-glance-overlay {
@@ -181,10 +181,12 @@
#zen-split-view-fake-browser {
position: absolute;
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);
box-shadow: var(--zen-big-shadow);
overflow: hidden;
will-change: width, margin-left;
&[side='right'] {
right: 0;