mirror of
https://github.com/zen-browser/desktop.git
synced 2026-06-22 10:53:22 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6e401db8ae | ||
|
|
afb4e4ff02 | ||
|
|
d55c0193c5 | ||
|
|
1b967a7080 |
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/customizableui/CustomizableUI.sys.mjs b/browser/components/customizableui/CustomizableUI.sys.mjs
|
||||
index d5d4596739cde5d3d49d6294867f5da122c526b8..126474de8a38a11948c437703c875e98ff7c5f86 100644
|
||||
index d5d4596739cde5d3d49d6294867f5da122c526b8..c206cfb374542c496be9bf0305a0a80bbcf503b2 100644
|
||||
--- a/browser/components/customizableui/CustomizableUI.sys.mjs
|
||||
+++ b/browser/components/customizableui/CustomizableUI.sys.mjs
|
||||
@@ -13,6 +13,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
||||
@@ -186,7 +186,7 @@ index d5d4596739cde5d3d49d6294867f5da122c526b8..126474de8a38a11948c437703c875e98
|
||||
});
|
||||
|
||||
lazy.log.debug(
|
||||
@@ -7930,7 +7931,37 @@ class OverflowableToolbar {
|
||||
@@ -7930,7 +7931,39 @@ class OverflowableToolbar {
|
||||
Math.max(targetWidth, targetChildrenWidth)
|
||||
);
|
||||
totalAvailWidth = Math.ceil(totalAvailWidth);
|
||||
@@ -194,6 +194,8 @@ index d5d4596739cde5d3d49d6294867f5da122c526b8..126474de8a38a11948c437703c875e98
|
||||
+ if (this.#target.id == 'nav-bar-customization-target' &&
|
||||
+ win.gZenVerticalTabsManager._hasSetSingleToolbar &&
|
||||
+ Services.prefs.getBoolPref("zen.view.overflow-webext-toolbar", true) &&
|
||||
+ !win.document.documentElement.hasAttribute("zen-creating-workspace") &&
|
||||
+ !win.document.documentElement.hasAttribute("inDOMFullscreen") &&
|
||||
+ !win.gURLBar.hasAttribute("breakout-extend")) {
|
||||
+ const availSelectors = ":is(#page-action-buttons, #zen-copy-url-button, .unified-extensions-item, .urlbar-addon-page-action)";
|
||||
+ const width = [
|
||||
@@ -225,7 +227,7 @@ index d5d4596739cde5d3d49d6294867f5da122c526b8..126474de8a38a11948c437703c875e98
|
||||
return { isOverflowing, targetContentWidth, totalAvailWidth };
|
||||
}
|
||||
|
||||
@@ -7991,7 +8022,11 @@ class OverflowableToolbar {
|
||||
@@ -7991,7 +8024,11 @@ class OverflowableToolbar {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -238,7 +240,7 @@ index d5d4596739cde5d3d49d6294867f5da122c526b8..126474de8a38a11948c437703c875e98
|
||||
lazy.log.debug(
|
||||
`Need ${minSize} but width is ${totalAvailWidth} so bailing`
|
||||
);
|
||||
@@ -8024,7 +8059,7 @@ class OverflowableToolbar {
|
||||
@@ -8024,7 +8061,7 @@ class OverflowableToolbar {
|
||||
}
|
||||
}
|
||||
if (!inserted) {
|
||||
@@ -247,7 +249,7 @@ index d5d4596739cde5d3d49d6294867f5da122c526b8..126474de8a38a11948c437703c875e98
|
||||
}
|
||||
child.removeAttribute("cui-anchorid");
|
||||
child.removeAttribute("overflowedItem");
|
||||
@@ -8150,6 +8185,9 @@ class OverflowableToolbar {
|
||||
@@ -8150,6 +8187,9 @@ class OverflowableToolbar {
|
||||
* if no such list exists.
|
||||
*/
|
||||
get #webExtList() {
|
||||
@@ -257,7 +259,7 @@ index d5d4596739cde5d3d49d6294867f5da122c526b8..126474de8a38a11948c437703c875e98
|
||||
if (!this.#webExtListRef) {
|
||||
let targetID = this.#toolbar.getAttribute("addon-webext-overflowtarget");
|
||||
if (!targetID) {
|
||||
@@ -8161,6 +8199,9 @@ class OverflowableToolbar {
|
||||
@@ -8161,6 +8201,9 @@ class OverflowableToolbar {
|
||||
let win = this.#toolbar.documentGlobal;
|
||||
let { panel } = win.gUnifiedExtensions;
|
||||
this.#webExtListRef = panel.querySelector(`#${targetID}`);
|
||||
@@ -267,7 +269,7 @@ index d5d4596739cde5d3d49d6294867f5da122c526b8..126474de8a38a11948c437703c875e98
|
||||
}
|
||||
return this.#webExtListRef;
|
||||
}
|
||||
@@ -8369,7 +8410,7 @@ class OverflowableToolbar {
|
||||
@@ -8369,7 +8412,7 @@ class OverflowableToolbar {
|
||||
break;
|
||||
}
|
||||
case "mousedown": {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/preferences/preferences.js b/browser/components/preferences/preferences.js
|
||||
index 57add34d876fb885275f1147209c6fbeee367a7c..d4c64b9ec8b6d1e6e0bd0b888c6e7351fbe299a4 100644
|
||||
index 57add34d876fb885275f1147209c6fbeee367a7c..5f4616d5f7d3d077326246e843775f58c293ee48 100644
|
||||
--- a/browser/components/preferences/preferences.js
|
||||
+++ b/browser/components/preferences/preferences.js
|
||||
@@ -132,6 +132,7 @@ ChromeUtils.defineLazyGetter(this, "gSubDialog", function () {
|
||||
@@ -10,7 +10,25 @@ index 57add34d876fb885275f1147209c6fbeee367a7c..d4c64b9ec8b6d1e6e0bd0b888c6e7351
|
||||
],
|
||||
resizeCallback: async ({ title, frame }) => {
|
||||
// Search within main document and highlight matched keyword.
|
||||
@@ -522,6 +523,10 @@ function init_all() {
|
||||
@@ -437,6 +438,8 @@ const CONFIG_PANES = Object.freeze({
|
||||
tabsBrowsing: {
|
||||
l10nId: "tabs-browsing-section",
|
||||
groupIds: [
|
||||
+ "defaultBrowserHome",
|
||||
+ "startupHome",
|
||||
"browserLayout",
|
||||
"tabs",
|
||||
"pageNavigation",
|
||||
@@ -477,7 +480,7 @@ function register_module(categoryName, categoryObject) {
|
||||
}
|
||||
this._initted = true;
|
||||
let template = document.getElementById("template-" + categoryName);
|
||||
- if (template && !srdSectionPrefs.all) {
|
||||
+ if (template && (!srdSectionPrefs.all || categoryName.startsWith("paneZen"))) {
|
||||
// Replace the template element with the nodes inside of it.
|
||||
template.replaceWith(template.content);
|
||||
|
||||
@@ -522,6 +525,10 @@ function init_all() {
|
||||
register_module("paneSearch", gSearchPane);
|
||||
register_module("panePrivacy", gPrivacyPane);
|
||||
register_module("paneContainers", gContainersPane);
|
||||
@@ -21,3 +39,12 @@ index 57add34d876fb885275f1147209c6fbeee367a7c..d4c64b9ec8b6d1e6e0bd0b888c6e7351
|
||||
|
||||
// Restore the cached Firefox Labs nav button visibility so it shows
|
||||
// immediately when recipes are expected to be available, before
|
||||
@@ -653,7 +660,7 @@ async function gotoPref(
|
||||
const kDefaultCategoryInternalName = redesignEnabled
|
||||
? "paneSync"
|
||||
: "paneGeneral";
|
||||
- const kDefaultCategory = redesignEnabled ? "sync" : "general";
|
||||
+ const kDefaultCategory = redesignEnabled ? "tabsBrowsing" : "general";
|
||||
let hash = document.location.hash;
|
||||
let category = aCategory || hash.substring(1) || kDefaultCategoryInternalName;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
|
||||
index 08b5b56e069d038d72c87355920c4ce8a55ed805..fff7da6865c694b439ee12d05db06d642a5b0a04 100644
|
||||
index 08b5b56e069d038d72c87355920c4ce8a55ed805..555ffd4772d9d4903491fdff9f3682852f8a52bd 100644
|
||||
--- a/browser/components/tabbrowser/content/tabbrowser.js
|
||||
+++ b/browser/components/tabbrowser/content/tabbrowser.js
|
||||
@@ -511,6 +511,7 @@
|
||||
@@ -14,9 +14,6 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..fff7da6865c694b439ee12d05db06d64
|
||||
return this.tabContainer.visibleTabs;
|
||||
}
|
||||
|
||||
- get pinnedTabCount() {
|
||||
- for (var i = 0; i < this.tabs.length; i++) {
|
||||
- if (!this.tabs[i].pinned) {
|
||||
+ zenHandleTabMove(...args) {
|
||||
+ return this.#handleTabMove(...args);
|
||||
+ }
|
||||
@@ -31,15 +28,15 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..fff7da6865c694b439ee12d05db06d64
|
||||
+ continue;
|
||||
+ }
|
||||
+ if (!item.pinned && !item.hasAttribute("zen-glance-tab")) {
|
||||
break;
|
||||
}
|
||||
+ break;
|
||||
+ }
|
||||
+ if (item.visible) {
|
||||
+ i += !item.hasAttribute("zen-glance-tab");
|
||||
+ }
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
+ }
|
||||
+ return i;
|
||||
+ }
|
||||
+
|
||||
+ ungroupTabsUntilNoActive(tab) {
|
||||
+ if (!tab || !tab.group) return;
|
||||
+ const activeGroups = tab.group.activeGroups;
|
||||
@@ -62,17 +59,19 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..fff7da6865c694b439ee12d05db06d64
|
||||
+ return i;
|
||||
+ }
|
||||
+
|
||||
+ get pinnedTabCount() {
|
||||
get pinnedTabCount() {
|
||||
- for (var i = 0; i < this.tabs.length; i++) {
|
||||
- if (!this.tabs[i].pinned) {
|
||||
+ let i = 0;
|
||||
+ for (let tab of this.tabs) {
|
||||
+ if (!tab.pinned && !tab.hasAttribute("zen-glance-tab")) {
|
||||
+ break;
|
||||
+ }
|
||||
break;
|
||||
}
|
||||
+ i += !tab.hasAttribute("zen-glance-tab");
|
||||
+ }
|
||||
+ return i;
|
||||
+ }
|
||||
+
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
+ get tabsWithoutGlance() {
|
||||
+ return this.tabs.filter(tab => !tab.hasAttribute("zen-glance-tab"));
|
||||
+ }
|
||||
@@ -297,7 +296,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..fff7da6865c694b439ee12d05db06d64
|
||||
+
|
||||
+ let hasZenDefaultUserContextId = false;
|
||||
+ let zenForcedWorkspaceId = undefined;
|
||||
+ if (beforeRouteResult.isRouteFound) {
|
||||
+ if (beforeRouteResult.isRouteFound && typeof userContextId !== "undefined") {
|
||||
+ userContextId = beforeRouteResult.userContextId;
|
||||
+ hasZenDefaultUserContextId = true;
|
||||
+ } else if (typeof gZenWorkspaces !== "undefined" && !_forZenEmptyTab) {
|
||||
|
||||
@@ -323,7 +323,7 @@ zen-workspace {
|
||||
overflow: hidden;
|
||||
color: color-mix(in srgb, var(--toolbox-textcolor) 95%, var(--zen-primary-color));
|
||||
|
||||
--tab-selected-bgcolor: color-mix(in srgb, light-dark(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.18)) 95%, var(--zen-primary-color)) !important;
|
||||
--tab-background-color-selected: color-mix(in srgb, light-dark(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.18)) 95%, var(--zen-primary-color)) !important;
|
||||
--tab-selected-shadow: 0 0.8px 1.5px 0px light-dark(rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.05)) !important;
|
||||
--tab-selected-textcolor: color-mix(in srgb, var(--toolbox-textcolor) 95%, var(--zen-primary-color)) !important;
|
||||
|
||||
@@ -399,8 +399,8 @@ zen-workspace {
|
||||
}
|
||||
}
|
||||
|
||||
:root:not(:is([animating-background], [swipe-gesture])) &:not([active]) {
|
||||
display: none;
|
||||
:root:not(:is([animating-background], [swipe-gesture])) #navigator-toolbox:not([movingtab]) &:not([active]) {
|
||||
-moz-subtree-hidden-only-visually: 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ tab-group[split-view-group] {
|
||||
}
|
||||
|
||||
& > .tabbrowser-tab {
|
||||
--tab-selected-bgcolor: var(--zen-split-view-active-tab-bg);
|
||||
--tab-background-color-selected: var(--zen-split-view-active-tab-bg);
|
||||
--tab-hover-background-color: transparent;
|
||||
--tab-selected-shadow: none;
|
||||
--border-radius-medium: var(--tab-border-radius);
|
||||
@@ -106,7 +106,7 @@ tab-group[split-view-group] {
|
||||
|
||||
tab-group[split-view-group]:where([hasactivetab]) &,
|
||||
&:has(> tab:is([multiselected])) {
|
||||
background-color: var(--tab-selected-bgcolor);
|
||||
background-color: var(--tab-background-color-selected);
|
||||
box-shadow: var(--tab-selected-shadow);
|
||||
|
||||
& > .tabbrowser-tab {
|
||||
|
||||
@@ -1084,7 +1084,7 @@
|
||||
}
|
||||
|
||||
&[in-urlbar] {
|
||||
background: var(--tab-selected-bgcolor) !important;
|
||||
background: var(--tab-background-color-selected) !important;
|
||||
box-shadow: var(--tab-selected-shadow);
|
||||
}
|
||||
}
|
||||
@@ -1172,7 +1172,7 @@
|
||||
border-radius: var(--border-radius-medium) !important;
|
||||
}
|
||||
|
||||
--tab-selected-bgcolor: light-dark(rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.2));
|
||||
--tab-background-color-selected: light-dark(rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.2));
|
||||
|
||||
&:not([visuallyselected], [multiselected="true"]) .tab-background {
|
||||
background: var(--zen-toolbar-element-bg);
|
||||
@@ -1195,7 +1195,7 @@
|
||||
}
|
||||
|
||||
&:hover .tab-background {
|
||||
background: light-dark(rgba(0, 0, 0, 0.1), var(--tab-selected-bgcolor));
|
||||
background: light-dark(rgba(0, 0, 0, 0.1), var(--tab-background-color-selected));
|
||||
}
|
||||
|
||||
/* stylelint-disable-next-line media-query-no-invalid */
|
||||
|
||||
Reference in New Issue
Block a user