mirror of
https://github.com/zen-browser/desktop.git
synced 2026-01-07 05:43:21 +00:00
Merge branch 'dev' of https://github.com/zen-browser/desktop into dev
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
value: true
|
||||
|
||||
- name: zen.theme.styled-status-panel
|
||||
value: false
|
||||
value: true
|
||||
|
||||
# ==== Mark: border radius ====
|
||||
|
||||
|
||||
@@ -880,7 +880,7 @@ var gZenCKSSettings = {
|
||||
|
||||
const labelValue = zenMissingKeyboardShortcutL10n[keyID] ?? l10nID;
|
||||
|
||||
if (zenIgnoreKeyboardShortcutL10n.includes(labelValue)) {
|
||||
if (zenIgnoreKeyboardShortcutL10n.includes(labelValue) || shortcut.shouldBeEmpty) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
|
||||
index 3204f253c23551650991d3385dd256d55892a012..78727727a0c623e0213177700124869b2163b89c 100644
|
||||
index 3204f253c23551650991d3385dd256d55892a012..0285b0bcf1e5ba769011c82729e010eedf8dcc29 100644
|
||||
--- a/browser/components/tabbrowser/content/tabbrowser.js
|
||||
+++ b/browser/components/tabbrowser/content/tabbrowser.js
|
||||
@@ -427,15 +427,64 @@
|
||||
@@ -804,7 +804,15 @@ index 3204f253c23551650991d3385dd256d55892a012..78727727a0c623e0213177700124869b
|
||||
window.focus();
|
||||
aEvent.preventDefault();
|
||||
break;
|
||||
@@ -8199,6 +8376,7 @@
|
||||
@@ -7264,7 +7441,6 @@
|
||||
}
|
||||
case "TabGroupCollapse":
|
||||
aEvent.target.tabs.forEach(tab => {
|
||||
- this.removeFromMultiSelectedTabs(tab);
|
||||
});
|
||||
break;
|
||||
case "TabGroupCreateByUser":
|
||||
@@ -8199,6 +8375,7 @@
|
||||
aWebProgress.isTopLevel
|
||||
) {
|
||||
this.mTab.setAttribute("busy", "true");
|
||||
@@ -812,7 +820,7 @@ index 3204f253c23551650991d3385dd256d55892a012..78727727a0c623e0213177700124869b
|
||||
gBrowser._tabAttrModified(this.mTab, ["busy"]);
|
||||
this.mTab._notselectedsinceload = !this.mTab.selected;
|
||||
}
|
||||
@@ -9200,7 +9378,7 @@ var TabContextMenu = {
|
||||
@@ -9200,7 +9377,7 @@ var TabContextMenu = {
|
||||
);
|
||||
contextUnpinSelectedTabs.hidden =
|
||||
!this.contextTab.pinned || !this.multiselected;
|
||||
@@ -821,7 +829,7 @@ index 3204f253c23551650991d3385dd256d55892a012..78727727a0c623e0213177700124869b
|
||||
// Build Ask Chat items
|
||||
TabContextMenu.GenAI.buildTabMenu(
|
||||
document.getElementById("context_askChat"),
|
||||
@@ -9520,6 +9698,7 @@ var TabContextMenu = {
|
||||
@@ -9520,6 +9697,7 @@ var TabContextMenu = {
|
||||
)
|
||||
);
|
||||
} else {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ body > #confetti {
|
||||
}
|
||||
|
||||
/* Bookmarks */
|
||||
#PersonalToolbar:not([collapsed='true']) {
|
||||
#PersonalToolbar:not([collapsed]) {
|
||||
min-height: 30px;
|
||||
}
|
||||
|
||||
@@ -256,3 +256,8 @@ body > #confetti {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Customizable modes */
|
||||
#customization-container {
|
||||
--toolbar-bgcolor: var(--zen-dialog-background);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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',
|
||||
}
|
||||
),
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
* - Bookmarks toolbar is visible OR
|
||||
* - The container is explicitly marked to hide controls (e.g., on Linux with reversed controls)
|
||||
*/
|
||||
&:has(#PersonalToolbar[collapsed='false']) {
|
||||
&:has(#PersonalToolbar:not([collapsed])) {
|
||||
%include zen-tabs/vertical-tabs-topbar.inc.css
|
||||
}
|
||||
&[should-hide='true'] {
|
||||
|
||||
@@ -43,7 +43,7 @@ z-index: 1;
|
||||
}
|
||||
|
||||
@media -moz-pref('zen.view.experimental-no-window-controls') {
|
||||
&:has(#PersonalToolbar[collapsed='true']) {
|
||||
&:has(#PersonalToolbar[collapsed]) {
|
||||
max-height: 0 !important;
|
||||
overflow: hidden;
|
||||
opacity: 0 !important;
|
||||
|
||||
@@ -498,7 +498,7 @@
|
||||
padding-top: 0; /* Reset top padding */
|
||||
|
||||
/* Ensure Personal Toolbar has no left padding when expanded */
|
||||
#PersonalToolbar:not([collapsed='true']) {
|
||||
#PersonalToolbar:not([collapsed]) {
|
||||
padding-left: 0 !important;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ add_task(async function test_Folder_Multiselected_Tabs() {
|
||||
await collapseEvent;
|
||||
|
||||
ok(tab2.multiselected, 'Tab 2 should not be multiselected');
|
||||
Assert.equal(gBrowser.multiSelectedTabsCount, 2, 'There should be 2 multiselected tabs');
|
||||
Assert.equal(gBrowser.multiSelectedTabsCount, 3, 'There should be 3 multiselected tabs');
|
||||
|
||||
for (const t of [tab1, tab2]) {
|
||||
BrowserTestUtils.removeTab(t);
|
||||
|
||||
@@ -596,39 +596,66 @@ var gZenWorkspaces = new (class extends nsZenMultiWindowFeature {
|
||||
|
||||
const scrollCooldown = 200; // Milliseconds to wait before allowing another scroll
|
||||
const scrollThreshold = 2; // Minimum scroll delta to trigger workspace change
|
||||
const scrollDeltaMode0Cooldown = 200; // Cooldown for consecutive DOM_DELTA_PIXEL events
|
||||
|
||||
toolbox.addEventListener(
|
||||
'wheel',
|
||||
async (event) => {
|
||||
if (this.privateWindowOrDisabled) return;
|
||||
|
||||
// Only process non-gesture scrolls
|
||||
if (event.deltaMode !== 1) return;
|
||||
// Allow DOM_DELTA_LINE (1) and DOM_DELTA_PIXEL (0) events
|
||||
if (event.deltaMode > 1) return;
|
||||
|
||||
const isVerticalScroll = event.deltaY && !event.deltaX;
|
||||
|
||||
//if the scroll is vertical this checks that a modifier key is used before proceeding
|
||||
if (isVerticalScroll) {
|
||||
const activationKeyMap = {
|
||||
ctrl: event.ctrlKey,
|
||||
alt: event.altKey,
|
||||
shift: event.shiftKey,
|
||||
meta: event.metaKey,
|
||||
};
|
||||
// Add cooling to consecutive DOM_DELTA_PIXEL events, which are usually from touchpads
|
||||
if (event.deltaMode === 0) {
|
||||
const now = Date.now();
|
||||
const timeSinceLastDeltaMode0 = now - (this._lastDeltaMode0Time || 0);
|
||||
this._lastDeltaMode0Time = now;
|
||||
|
||||
if (
|
||||
this.activationMethod in activationKeyMap &&
|
||||
!activationKeyMap[this.activationMethod]
|
||||
Math.abs(event.deltaY || 0) === 0 &&
|
||||
timeSinceLastDeltaMode0 < scrollDeltaMode0Cooldown
|
||||
) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
const absX = Math.abs(event.deltaX || 0);
|
||||
const absY = Math.abs(event.deltaY || 0);
|
||||
|
||||
const isVerticalScroll = absY > absX * 2;
|
||||
const isHorizontalScroll = absX > absY * 2;
|
||||
|
||||
const activationKeyMap = {
|
||||
ctrl: event.ctrlKey,
|
||||
alt: event.altKey,
|
||||
shift: event.shiftKey,
|
||||
meta: event.metaKey,
|
||||
};
|
||||
const modifierActive =
|
||||
this.activationMethod in activationKeyMap && activationKeyMap[this.activationMethod];
|
||||
|
||||
let delta;
|
||||
let shouldProceed = false;
|
||||
|
||||
if (isVerticalScroll && modifierActive) {
|
||||
// scroll is vertical + modifier key
|
||||
delta = event.deltaY;
|
||||
shouldProceed = true;
|
||||
} else if (isHorizontalScroll) {
|
||||
// clear horizontal scrolling
|
||||
delta = event.deltaX;
|
||||
shouldProceed = true;
|
||||
} else {
|
||||
// diagonal scrolling or unclear direction, ignore
|
||||
return;
|
||||
}
|
||||
|
||||
if (!shouldProceed) return;
|
||||
|
||||
const currentTime = Date.now();
|
||||
if (currentTime - this._lastScrollTime < scrollCooldown) return;
|
||||
|
||||
//this decides which delta to use
|
||||
const delta = isVerticalScroll ? event.deltaY : event.deltaX;
|
||||
if (Math.abs(delta) < scrollThreshold) return;
|
||||
|
||||
// Determine scroll direction
|
||||
|
||||
Reference in New Issue
Block a user