1
0
Fork 1
mirror of https://github.com/zen-browser/desktop.git synced 2025-07-07 23:00:01 +02:00

HUGE CHANGES (updated to firefox 130 and new UI)

This commit is contained in:
mauro-balades 2024-09-03 18:21:57 +02:00
parent 80e99b649d
commit 7ef180fe7e
14 changed files with 147 additions and 433 deletions

View file

@ -23,7 +23,7 @@ Experience tranquillity while browsing the web without people tracking you!
# Compatibility
Zen is currently built using firefox version `129.0.2`!
Zen is currently built using firefox version `130.0`!
* Check out the latest [release notes](https://www.zen-browser.app/release-notes)!

View file

@ -11,3 +11,5 @@
* Overall stability
* Pinning tabs (Grid layout)
* Overall UX
* Themes Page
* Settings Page

View file

@ -1,5 +1,5 @@
diff --git a/browser/base/content/navigator-toolbox.inc.xhtml b/browser/base/content/navigator-toolbox.inc.xhtml
index 390a1300a1213af2b411ba09c67e3c25750ee6c3..a7ab07f8e8a0c5f91a6c12eb5d27c56edbd7405c 100644
index 18b91c95b88d11ddb257de03f12bc3e4cc75a96a..f117cfa7c9d1f9eb537cebbef42a9d2d945d53ac 100644
--- a/browser/base/content/navigator-toolbox.inc.xhtml
+++ b/browser/base/content/navigator-toolbox.inc.xhtml
@@ -2,7 +2,7 @@
@ -20,27 +20,29 @@ index 390a1300a1213af2b411ba09c67e3c25750ee6c3..a7ab07f8e8a0c5f91a6c12eb5d27c56e
<toolbartabstop/>
<hbox id="TabsToolbar-customization-target" flex="1">
<toolbarbutton id="firefox-view-button"
+ hidden="true"
+ hidden="true"
class="toolbarbutton-1 chromeclass-toolbar-additional"
data-l10n-id="toolbar-button-firefox-view-2"
role="button"
@@ -50,13 +51,14 @@
@@ -50,7 +51,7 @@
aria-multiselectable="true"
setfocus="false"
tooltip="tabbrowser-tab-tooltip"
- orient="horizontal"
+ orient="vertical"
stopwatchid="FX_TAB_CLICK_MS">
<hbox class="tab-drop-indicator" hidden="true"/>
# If the name (tabbrowser-arrowscrollbox) or structure of this changes
# significantly, there is an optimization in
# DisplayPortUtils::MaybeCreateDisplayPortInFirstScrollFrameEncountered based
# the current structure that we may want to revisit.
@@ -66,7 +67,7 @@
tooltip="dynamic-shortcut-tooltip"
data-l10n-id="tabs-toolbar-new-tab"/>
</html:div>
- <arrowscrollbox id="tabbrowser-arrowscrollbox" orient="horizontal" flex="1" style="min-width: 1px;" clicktoscroll="true" scrolledtostart="true" scrolledtoend="true">
+ <arrowscrollbox id="tabbrowser-arrowscrollbox" orient="vertical" style="min-width: 1px;" clicktoscroll="true" scrolledtostart="true" scrolledtoend="true">
<tab is="tabbrowser-tab" class="tabbrowser-tab" selected="true" visuallyselected="" fadein=""/>
<hbox id="tabbrowser-arrowscrollbox-periphery">
<toolbartabstop/>
@@ -103,9 +105,10 @@
@@ -113,9 +114,10 @@
<toolbarbutton id="content-analysis-indicator"
oncommand="ContentAnalysis.showPanel(this, PanelUI);"
class="toolbarbutton-1 content-analysis-indicator-icon"/>
@ -53,7 +55,7 @@ index 390a1300a1213af2b411ba09c67e3c25750ee6c3..a7ab07f8e8a0c5f91a6c12eb5d27c56e
</toolbar>
</vbox>
@@ -450,6 +453,7 @@
@@ -471,6 +473,7 @@
<toolbarbutton id="fxa-toolbar-menu-button" class="toolbarbutton-1 chromeclass-toolbar-additional subviewbutton-nav"
badged="true"
@ -61,12 +63,11 @@ index 390a1300a1213af2b411ba09c67e3c25750ee6c3..a7ab07f8e8a0c5f91a6c12eb5d27c56e
delegatesanchor="true"
onmousedown="gSync.toggleAccountPanel(this, event)"
onkeypress="gSync.toggleAccountPanel(this, event)"
@@ -501,6 +505,8 @@
@@ -522,6 +525,7 @@
consumeanchor="PanelUI-button"
data-l10n-id="appmenu-menu-button-closed2"/>
</toolbaritem>
+
+ #include titlebar-items.inc.xhtml
+#include titlebar-items.inc.xhtml
</toolbar>
<toolbar id="PersonalToolbar"

View file

@ -3,6 +3,45 @@
#titlebar {
height: 100%;
}
#vertical-pinned-tabs-container {
padding-inline-end: 0 !important;
}
#tabs-newtab-button {
display: none !important;
}
#newtab-button-container {
margin-inline-end: 0 !important;
margin-top: 0;
margin-bottom: calc(var(--space-small) / 2);
position: relative;
padding-top: 0 !important;
--zen-sidebar-action-button-width: 35px;
& #vertical-tabs-newtab-button {
background: var(--button-hover-bgcolor);
}
&[showborder] {
margin-top: var(--space-small);
border-top: 0px solid transparent !important;
padding-top: var(--space-small) !important;
&::before {
width: 70%;
height: 1.2px;
background: var(--zen-colors-border);
content: '';
position: absolute;
top: -3px;
left: 50%;
transform: translateX(-50%);
}
}
}
#navigator-toolbox {
--zen-tabbrowser-padding: 5px;
@ -164,23 +203,6 @@
display: flex;
}
#tabbrowser-tabs:has(.tabbrowser-tab[pinned]) .tabbrowser-tab:nth-child(1 of [fadein]:not([pinned]):not([hidden])) {
margin-top: 15px;
position: relative;
overflow: visible;
& .tab-stack::before {
content: '';
position: absolute;
top: -11px;
left: 0;
width: 100%;
height: 1.5px;
border-radius: 1px;
background: var(--zen-colors-border);
}
}
.tab-close-button {
position: absolute;
display: none;
@ -226,10 +248,12 @@
padding-inline-start: 0 !important;
margin-inline-start: 0 !important;
grid-gap: 0 !important;
}
#tabbrowser-arrowscrollbox {
margin: 3px 0 !important;
margin-bottom: 3px !important;
}
#alltabs-button stack {
@ -269,6 +293,23 @@
border: none;
padding-left: 2px;
animation: var(--zen-hover-animation) 0.3s backwards;
#vertical-pinned-tabs-container {
margin-left: var(--zen-tabbrowser-padding);
}
#newtab-button-container {
margin: var(--zen-tabbrowser-padding);
margin-top: 0;
&[showborder] {
margin-top: var(--zen-tabbrowser-padding);
&::before {
width: 95%;
top: 0;
}
}
}
& .tab-label-container {
display: block;
@ -349,6 +390,7 @@
display: grid;
grid-template-columns: repeat(auto-fill, minmax(var(--tab-min-height), 1fr));
padding: calc(var(--zen-tabbrowser-padding) / 2);
padding-right: 0;
}
& .tabbrowser-tab:not([pinned]),
@ -402,6 +444,7 @@
#tabbrowser-tabpanels .browserSidebarContainer {
margin-left: var(--zen-element-separation) !important;
margin-right: 0 !important;
}
}
@ -458,6 +501,11 @@
visibility: hidden !important;
}
& #tabbrowser-tabs {
--zen-tabbrowser-tabs-on-hover-padding: var(--zen-tabbrowser-padding);
padding: var(--zen-tabbrowser-tabs-on-hover-padding) !important;
}
& #zen-sidebar-icons-wrapper {
display: block !important;
}
@ -502,5 +550,11 @@
}
}
}
@media not (-moz-bool-pref: "zen.tabs.vertical.right-side") {
#tabbrowser-tabs {
--zen-tabbrowser-tabs-on-hover-padding: 0 var(--zen-tabbrowser-padding) 0 0 !important;
}
}
}
}

View file

@ -105,22 +105,6 @@
height: calc(var(--urlbar-min-height) - 4 * var(--urlbar-container-padding)) !important;
}
toolbar .toolbarbutton-1:not(.unified-extensions-item-action-button) {
& > .toolbarbutton-icon,
& > .toolbarbutton-badge-stack {
width: calc(2 * var(--toolbarbutton-inner-padding) + 18px) !important;
height: calc(2 * var(--toolbarbutton-inner-padding) + 18px) !important;
}
}
toolbar .zen-sidebar-panel-button {
& > .toolbarbutton-icon,
& > .toolbarbutton-badge-stack {
width: calc(2 * var(--toolbarbutton-inner-padding) + 20px) !important;
height: calc(2 * var(--toolbarbutton-inner-padding) + 20px) !important;
}
}
#identity-permission-box {
border-top-left-radius: 0 !important;
border-bottom-left-radius: 0 !important;

View file

@ -84,7 +84,7 @@ index 3affb19d1a243da4a5782c9a4a5588d165b4119f..837f078ff1f3a65a40877c1380c6d050
id="searchInput"
data-l10n-id="search-input-box2"
data-l10n-attrs="placeholder, style"
hidden="true"/>
/>
+#endif
</hbox>
</hbox>

View file

@ -1,312 +0,0 @@
diff --git a/browser/components/tabbrowser/content/tabs.js b/browser/components/tabbrowser/content/tabs.js
index e9aa0f03c26dc26e1a2e56d28fadb70e60c8e8ca..f66f9c168ab560e41ea9d03c2d0727e4a5c15132 100644
--- a/browser/components/tabbrowser/content/tabs.js
+++ b/browser/components/tabbrowser/content/tabs.js
@@ -552,19 +552,36 @@
}
dt.setDragImage(toDrag, dragImageOffset, dragImageOffset);
+ const zenVerticalTabs = Services.prefs.getBoolPref(
+ "zen.tabs.vertical",
+ false
+ );
+
// _dragData.offsetX/Y give the coordinates that the mouse should be
// positioned relative to the corner of the new window created upon
// dragend such that the mouse appears to have the same position
// relative to the corner of the dragged tab.
function clientX(ele) {
+ if (zenVerticalTabs) {
+ return 0;
+ }
return ele.getBoundingClientRect().left;
}
+ function clientY(ele) {
+ if (!zenVerticalTabs) {
+ return 0;
+ }
+ return ele.getBoundingClientRect().top;
+ }
let tabOffsetX = clientX(tab) - clientX(this);
+ let tabOffsetY = clientY(tab) - clientY(this);
tab._dragData = {
offsetX: event.screenX - window.screenX - tabOffsetX,
- offsetY: event.screenY - window.screenY,
+ offsetY: event.screenY - window.screenY - tabOffsetY,
scrollX: this.arrowScrollbox.scrollbox.scrollLeft,
+ scrollY: this.arrowScrollbox.scrollbox.scrollTop,
screenX: event.screenX,
+ screenY: event.screenY,
movingTabs: (tab.multiselected ? gBrowser.selectedTabs : [tab]).filter(
t => t.pinned == tab.pinned
),
@@ -651,21 +668,30 @@
}
}
+ const verticalTabs = Services.prefs.getBoolPref(
+ "zen.tabs.vertical",
+ false
+ );
+ const left = verticalTabs ? "top" : "left";
+ const right = verticalTabs ? "bottom" : "right";
+ const width = verticalTabs ? "height" : "width";
+ const clientWidth = verticalTabs ? "clientHeight" : "clientWidth";
+
var rect = arrowScrollbox.getBoundingClientRect();
var newMargin;
if (pixelsToScroll) {
// if we are scrolling, put the drop indicator at the edge
// so that it doesn't jump while scrolling
let scrollRect = arrowScrollbox.scrollClientRect;
- let minMargin = scrollRect.left - rect.left;
+ let minMargin = scrollRect[left] - rect[left];
let maxMargin = Math.min(
- minMargin + scrollRect.width,
- scrollRect.right
+ minMargin + scrollRect[width],
+ scrollRect[right]
);
if (RTL_UI) {
[minMargin, maxMargin] = [
- this.clientWidth - maxMargin,
- this.clientWidth - minMargin,
+ this[clientWidth] - maxMargin,,
+ this[clientWidth] - minMargin,
];
}
newMargin = pixelsToScroll > 0 ? maxMargin : minMargin;
@@ -675,29 +701,38 @@
if (newIndex == children.length) {
let tabRect = this._getVisibleTabs().at(-1).getBoundingClientRect();
if (RTL_UI) {
- newMargin = rect.right - tabRect.left;
+ newMargin = rect[right] - tabRect[left];
} else {
- newMargin = tabRect.right - rect.left;
+ newMargin = tabRect[right] - rect[left];
}
} else {
let tabRect = children[newIndex].getBoundingClientRect();
if (RTL_UI) {
- newMargin = rect.right - tabRect.right;
+ newMargin = rect[right] - tabRect[right];
} else {
- newMargin = tabRect.left - rect.left;
+ newMargin = tabRect[left] - rect[left];
}
}
}
ind.hidden = false;
- newMargin += ind.clientWidth / 2;
- if (RTL_UI) {
+ newMargin += ind[clientWidth] / 2;
+ if (RTL_UI && !verticalTabs) {
newMargin *= -1;
}
ind.style.transform = "translate(" + Math.round(newMargin) + "px)";
+
+ ind.style.transform =
+ "translate(" + verticalTabs
+ ? "0, "
+ : "" + Math.round(newMargin) + "px)";
}
on_drop(event) {
+ const verticalTabs = Services.prefs.getBoolPref(
+ "zen.tabs.vertical",
+ false
+ );
var dt = event.dataTransfer;
var dropEffect = dt.dropEffect;
var draggedTab;
@@ -754,7 +789,7 @@
incrementDropIndex = false;
}
- if (oldTranslateX && oldTranslateX != newTranslateX && !gReduceMotion) {
+ if (oldTranslateX && oldTranslateX != newTranslateX && !(gReduceMotion || verticalTabs)) {
for (let tab of movingTabs) {
tab.toggleAttribute("tabdrop-samewindow", true);
tab.style.transform = "translateX(" + newTranslateX + "px)";
@@ -1081,6 +1116,15 @@
return this._allTabs;
}
let children = Array.from(this.arrowScrollbox.children);
+ // Zen: We also need to exclude subgroups
+ // Zen: For example: tab-group(tab1, tab2), tab3, tab-group(tab4)
+ // Zen: In this case, we need to get [tab1, tab2, tab3, tab4]
+ // Zen: NOTE: There should be no tab-group inside of a tab-group
+ for (let i = 0; i < children.length; i++) {
+ if (children[i].classList.contains("zen-tab-group")) {
+ children.splice(i, 1, ...children[i].children);
+ }
+ }
children.pop();
this._allTabs = children;
return children;
@@ -1386,7 +1430,7 @@
let tabsToReset = [];
for (let i = numPinned; i < tabs.length; i++) {
let tab = tabs[i];
- tab.style.setProperty("max-width", aTabWidth, "important");
+ //tab.style.setProperty("max-width", aTabWidth, "important");
if (!isEndTab) {
// keep tabs the same width
tab.style.transition = "none";
@@ -1476,11 +1520,11 @@
for (let i = numPinned - 1; i >= 0; i--) {
let tab = tabs[i];
width += layoutData.pinnedTabWidth;
- tab.style.setProperty(
- "margin-inline-start",
- -(width + layoutData.scrollStartOffset) + "px",
- "important"
- );
+ //tab.style.setProperty(
+ // "margin-inline-start",
+ // -(width + layoutData.scrollStartOffset) + "px",
+ // "important"
+ //);
tab._pinnedUnscrollable = true;
}
this.style.setProperty(
@@ -1515,19 +1559,30 @@
}
}
- if (!("animLastScreenX" in draggedTab._dragData)) {
- draggedTab._dragData.animLastScreenX = draggedTab._dragData.screenX;
- }
-
- let screenX = event.screenX;
- if (screenX == draggedTab._dragData.animLastScreenX) {
- return;
+ const verticalTabs = Services.prefs.getBoolPref(
+ "zen.tabs.vertical",
+ false
+ );
+ const animLastScreen = verticalTabs
+ ? "animLastScreenY"
+ : "animLastScreenX";
+ const screen = verticalTabs ? "screenY" : "screenX";
+ const dimensions = verticalTabs ? "height" : "width";
+ const scrollEdge = verticalTabs ? "scrollTop" : "scrollLeft";
+ const scrollDimension = verticalTabs ? "scrollY" : "scrollX";
+ const translate = verticalTabs ? "translateY" : "translateX";
+ if (!(animLastScreen in draggedTab._dragData)) {
+ draggedTab._dragData[animLastScreen] = draggedTab._dragData[screen];
+ }
+ let screenX = event[screen];
+ if (screenX == draggedTab._dragData[animLastScreen]) {
+ return;
}
// Direction of the mouse movement.
- let ltrMove = screenX > draggedTab._dragData.animLastScreenX;
+ let ltrMove = screenX > draggedTab._dragData[animLastScreen];
- draggedTab._dragData.animLastScreenX = screenX;
+ draggedTab._dragData[animLastScreen] = screenX;
let pinned = draggedTab.pinned;
let numPinned = gBrowser._numPinnedTabs;
@@ -1536,36 +1591,39 @@
pinned ? numPinned : undefined
);
- if (RTL_UI) {
+ if (RTL_UI && !verticalTabs) {
tabs.reverse();
// Copy moving tabs array to avoid infinite reversing.
movingTabs = [...movingTabs].reverse();
}
- let tabWidth = draggedTab.getBoundingClientRect().width;
+ let tabWidth = draggedTab.getBoundingClientRect()[dimensions];
let shiftWidth = tabWidth * movingTabs.length;
+ // We want to store the output value as the width and the height to force
+ // compatibility with code elsewhere
draggedTab._dragData.tabWidth = tabWidth;
+ draggedTab._dragData.tabHeight = tabWidth;
// Move the dragged tab based on the mouse position.
let leftTab = tabs[0];
let rightTab = tabs[tabs.length - 1];
- let rightMovingTabScreenX = movingTabs[movingTabs.length - 1].screenX;
- let leftMovingTabScreenX = movingTabs[0].screenX;
- let translateX = screenX - draggedTab._dragData.screenX;
+ let rightMovingTabScreenX = movingTabs[movingTabs.length - 1][screen];
+ let leftMovingTabScreenX = movingTabs[0][screen];
+ let translateX = screenX - draggedTab._dragData[screen];
if (!pinned) {
translateX +=
- this.arrowScrollbox.scrollbox.scrollLeft -
- draggedTab._dragData.scrollX;
+ this.arrowScrollbox.scrollbox[scrollEdge] -
+ draggedTab._dragData[scrollDimension];
}
- let leftBound = leftTab.screenX - leftMovingTabScreenX;
+ let leftBound = leftTab[screen] - leftMovingTabScreenX;
let rightBound =
- rightTab.screenX +
- rightTab.getBoundingClientRect().width -
+ rightTab[screen] +
+ rightTab.getBoundingClientRect()[dimensions] -
(rightMovingTabScreenX + tabWidth);
translateX = Math.min(Math.max(translateX, leftBound), rightBound);
for (let tab of movingTabs) {
- tab.style.transform = "translateX(" + translateX + "px)";
+ tab.style.transform = translate + "(" + translateX + "px)";
}
draggedTab._dragData.translateX = translateX;
@@ -1598,11 +1656,11 @@
if (tabs[mid] == draggedTab && ++mid > high) {
break;
}
- screenX = tabs[mid].screenX + getTabShift(tabs[mid], oldIndex);
+ screenX = tabs[mid][screen] + getTabShift(tabs[mid], oldIndex);
if (screenX > tabCenter) {
high = mid - 1;
} else if (
- screenX + tabs[mid].getBoundingClientRect().width <
+ screenX + tabs[mid].getBoundingClientRect()[dimensions] <
tabCenter
) {
low = mid + 1;
@@ -1625,16 +1683,16 @@
for (let tab of tabs) {
if (tab != draggedTab) {
let shift = getTabShift(tab, newIndex);
- tab.style.transform = shift ? "translateX(" + shift + "px)" : "";
+ tab.style.transform = shift ? translate + "(" + shift + "px)" : "";
}
}
function getTabShift(tab, dropIndex) {
if (tab._tPos < draggedTab._tPos && tab._tPos >= dropIndex) {
- return RTL_UI ? -shiftWidth : shiftWidth;
+ return RTL_UI && !verticalTabs ? -shiftWidth : shiftWidth;
}
if (tab._tPos > draggedTab._tPos && tab._tPos < dropIndex) {
- return RTL_UI ? shiftWidth : -shiftWidth;
+ return RTL_UI && !verticalTabs ? shiftWidth : -shiftWidth;
}
return 0;
}
@@ -1706,9 +1764,9 @@
// Slide the relevant tabs to their new position.
for (let t of this._getVisibleTabs()) {
- if (t.groupingTabsData && t.groupingTabsData.translateX) {
- let translateX = (RTL_UI ? -1 : 1) * t.groupingTabsData.translateX;
- t.style.transform = "translateX(" + translateX + "px)";
+ if (t.groupingTabsData && t.groupingTabsData.translateY) {
+ let translateX = (RTL_UI ? -1 : 1) * t.groupingTabsData.translateY;
+ t.style.transform = "translateY(" + translateX + "px)";
}
}

View file

@ -1,24 +1,23 @@
diff --git a/browser/themes/shared/identity-block/identity-block.css b/browser/themes/shared/identity-block/identity-block.css
index 39ae2b00791a7bfd875961de60736612f08892ae..5d950d855a5625ebfb20f6f49a65f3e1e2eb4a6e 100644
index cb6bb55dd3aebdaebb92c9e2cba1f2a108b4d7bb..9d5055a007c63cb779e67ae58a1d937ad2a31bfe 100644
--- a/browser/themes/shared/identity-block/identity-block.css
+++ b/browser/themes/shared/identity-block/identity-block.css
@@ -64,8 +64,9 @@
}
@@ -70,7 +70,7 @@
#identity-box[pageproxystate="valid"]:is(.notSecureText, .chromeUI, .extensionPage) > .identity-box-button,
+#identity-box[pageproxystate="valid"] > .identity-box-button,
#urlbar-label-box {
- background-color: var(--urlbar-box-bgcolor);
+ background-color: light-dark(#cecece, rgb(66, 65, 77));
color: var(--urlbar-box-text-color);
padding-inline: 8px;
border-radius: var(--urlbar-icon-border-radius);
@@ -154,11 +155,11 @@
}
@@ -164,16 +164,16 @@
}
#identity-box[pageproxystate="invalid"] #identity-icon {
- list-style-image: url(chrome://global/skin/icons/search-glass.svg);
+ list-style-image: url(chrome://global/skin/icons/search-glass.svg) !important;
#identity-icon {
- list-style-image: url(chrome://global/skin/icons/search-glass.svg);
+ list-style-image: url(chrome://global/skin/icons/search-glass.svg) !important;
}
}
#urlbar[actiontype="extension"] > .urlbar-input-container > #identity-box #identity-icon {
@ -27,3 +26,8 @@ index 39ae2b00791a7bfd875961de60736612f08892ae..5d950d855a5625ebfb20f6f49a65f3e1
}
#identity-box[pageproxystate="valid"].extensionPage #identity-icon {
- list-style-image: url(chrome://mozapps/skin/extensions/extension.svg);
+ list-style-image: url(chrome://mozapps/skin/extensions/extension.svg) !important;
}
#identity-box[pageproxystate="valid"].verifiedDomain #identity-icon,

View file

@ -1,10 +1,10 @@
diff --git a/browser/themes/shared/tabbrowser/tab-hover-preview.css b/browser/themes/shared/tabbrowser/tab-hover-preview.css
index 5df2561b9f0e5497a596e4e261ceaac30778e754..cbea9912e7ae15f7a277ecbdcd681cc4e7a4da72 100644
index 90680fb5870bd7387656d3066c39b6d6f80916bd..636c2f4c7cfda0280b24e40cf7613321bf1d3905 100644
--- a/browser/themes/shared/tabbrowser/tab-hover-preview.css
+++ b/browser/themes/shared/tabbrowser/tab-hover-preview.css
@@ -44,3 +44,24 @@
display: block;
}
@@ -52,3 +52,24 @@
from { opacity: 0; }
to { opacity: 100; }
}
+
+/**
@ -27,3 +27,4 @@ index 5df2561b9f0e5497a596e4e261ceaac30778e754..cbea9912e7ae15f7a277ecbdcd681cc4
+.tab-preview-thumbnail-container canvas {
+ border-top: 1px solid var(--zen-border-color);
+}
\ No newline at end of file

View file

@ -1,5 +1,5 @@
diff --git a/browser/themes/shared/tabbrowser/tabs.css b/browser/themes/shared/tabbrowser/tabs.css
index 22d1fe3d0730062abdc181912e93721fdc1c824d..70ca793ab5e2c73e6f6b50d1c9740a4799d8f374 100644
index 1ef4874d6e7f3b43f4c82db6a679883cf34ab493..33837e5f56e4fbefa2a2d2ee68ee51750357db59 100644
--- a/browser/themes/shared/tabbrowser/tabs.css
+++ b/browser/themes/shared/tabbrowser/tabs.css
@@ -17,7 +17,7 @@
@ -8,10 +8,10 @@ index 22d1fe3d0730062abdc181912e93721fdc1c824d..70ca793ab5e2c73e6f6b50d1c9740a47
--tab-block-margin: 4px;
- --tab-loading-fill: #0A84FF;
+ --tab-loading-fill: var(--zen-primary-color);
--tab-hover-background-color: color-mix(in srgb, currentColor 11%, transparent);
--tab-selected-textcolor: var(--toolbar-color);
--tab-selected-bgcolor: var(--toolbar-bgcolor);
--tab-selected-color-scheme: var(--toolbar-color-scheme);
@@ -122,12 +122,12 @@
@@ -133,12 +133,12 @@
visibility: hidden;
}
@ -27,26 +27,16 @@ index 22d1fe3d0730062abdc181912e93721fdc1c824d..70ca793ab5e2c73e6f6b50d1c9740a47
}
}
@@ -357,8 +357,7 @@
@@ -368,8 +368,6 @@
animation-delay: -1.5s;
}
- &[selected]:not([src], [pinned], [crashed], [pictureinpicture]),
- &:not([src], [pinned], [crashed], [sharing], [pictureinpicture]),
+
&[busy] {
display: none;
}
@@ -627,7 +626,7 @@
#tabbrowser-tabs[haspinnedtabs]:not([positionpinnedtabs]) > #tabbrowser-arrowscrollbox > .tabbrowser-tab:nth-child(1 of :not([pinned], [hidden])) {
/* Add a gap between the last pinned tab and the first visible tab */
- margin-inline-start: 12px !important; /* .tabbrowser-tab sets margin: 0 !important; */
+ margin-inline-start: auto !important; /* .tabbrowser-tab sets margin: 0 !important; */
}
.tab-label[attention]:not([selected]) {
@@ -772,6 +771,7 @@ sidebar-main[expanded] > #vertical-tabs > #tabbrowser-tabs[orient="vertical"] .t
@@ -912,6 +910,7 @@ sidebar-main[expanded] > #vertical-tabs > #tabbrowser-tabs[orient="vertical"] >
.titlebar-spacer[type="pre-tabs"],
.titlebar-spacer[type="post-tabs"] {
width: 40px;
@ -54,7 +44,7 @@ index 22d1fe3d0730062abdc181912e93721fdc1c824d..70ca793ab5e2c73e6f6b50d1c9740a47
}
@media (max-width: 500px) {
@@ -787,7 +787,7 @@ sidebar-main[expanded] > #vertical-tabs > #tabbrowser-tabs[orient="vertical"] .t
@@ -927,7 +926,7 @@ sidebar-main[expanded] > #vertical-tabs > #tabbrowser-tabs[orient="vertical"] >
toolbarbutton:not(#firefox-view-button),
toolbarpaletteitem:not(#wrapper-firefox-view-button)
) + #tabbrowser-tabs {

View file

@ -1,12 +1,12 @@
diff --git a/toolkit/content/aboutSupport.xhtml b/toolkit/content/aboutSupport.xhtml
index d28ca0dd0939c9a9c43bc7c6b3c7184172c09ed8..112d060540e254e1766c145913e21819f62439f8 100644
index 05e3d72a6e67900e9b3d9bfd35c89b056c7ca747..55408e77830492765c976dd967ca14a7b74cba97 100644
--- a/toolkit/content/aboutSupport.xhtml
+++ b/toolkit/content/aboutSupport.xhtml
@@ -30,6 +30,7 @@
<link rel="localization" href="preview/genai.ftl" />
@@ -31,6 +31,7 @@
#ifndef ANDROID
<link rel="localization" href="toolkit/featuregates/features.ftl"/>
#endif
#endif
+ <script src="chrome://browser/content/zenThemeModifier.js"></script>
+ <script src="chrome://browser/content/zenThemeModifier.js"></script>
</head>
<body class="wide-container">

View file

@ -1,58 +1,47 @@
diff --git a/toolkit/profile/nsToolkitProfileService.cpp b/toolkit/profile/nsToolkitProfileService.cpp
index aeab25c61f3b04cfa19ec93e2abe0772d8656e61..b4ada9432abda484dc54a04e2993745d19ec71f7 100644
index 6e40f51cfc6e76fbd63d87fe7a416481fe9bb2f6..3bc78e3077264387415a06a52a3a8fbc56339484 100644
--- a/toolkit/profile/nsToolkitProfileService.cpp
+++ b/toolkit/profile/nsToolkitProfileService.cpp
@@ -72,6 +72,8 @@ using namespace mozilla;
#define INSTALL_PREFIX "Install"
#define INSTALL_PREFIX_LENGTH 7
+#include "zenToolkitProfileServiceDefaultOverride.h"
+
struct KeyValue {
KeyValue(const char* aKey, const char* aValue) : key(aKey), value(aValue) {}
@@ -234,13 +236,14 @@ void RemoveProfileFiles(nsIToolkitProfile* aProfile, bool aInBackground) {
@@ -234,7 +234,7 @@ void RemoveProfileFiles(nsIToolkitProfile* aProfile, bool aInBackground) {
}
nsToolkitProfile::nsToolkitProfile(const nsACString& aName, nsIFile* aRootDir,
- nsIFile* aLocalDir, bool aFromDB)
+ nsIFile* aLocalDir, bool aFromDB, const nsACString& aZenAvatarPath)
- nsIFile* aLocalDir, bool aFromDB,
+ nsIFile* aLocalDir, bool aFromDB, const nsACString& aZenAvatarPath,
const nsACString& aStoreID = VoidCString(),
bool aShowProfileSelector = false)
: mName(aName),
mRootDir(aRootDir),
mLocalDir(aLocalDir),
@@ -244,7 +244,8 @@ nsToolkitProfile::nsToolkitProfile(const nsACString& aName, nsIFile* aRootDir,
mShowProfileSelector(aShowProfileSelector),
mLock(nullptr),
mIndex(0),
- mSection("Profile") {
+ mSection("Profile"),
+ mZenAvatarPath(aZenAvatarPath){
+ mZenAvatarPath(aZenAvatarPath) {
NS_ASSERTION(aRootDir, "No file!");
RefPtr<nsToolkitProfile> prev =
@@ -253,8 +256,13 @@ nsToolkitProfile::nsToolkitProfile(const nsACString& aName, nsIFile* aRootDir,
nsToolkitProfileService::gService->mProfiles.insertBack(this);
@@ -259,6 +260,10 @@ nsToolkitProfile::nsToolkitProfile(const nsACString& aName, nsIFile* aRootDir,
// If this profile isn't in the database already add it.
+ nsINIParser* db = &nsToolkitProfileService::gService->mProfileDB;
if (!aFromDB) {
- nsINIParser* db = &nsToolkitProfileService::gService->mProfileDB;
nsINIParser* db = &nsToolkitProfileService::gService->mProfileDB;
+ if (mZenAvatarPath == ""_ns) {
+ auto randomId = std::rand() % 100;
+ mZenAvatarPath = ("chrome://browser/content/zen-avatars/avatar-" + std::to_string(randomId) + ".svg").c_str();
+ }
+
db->SetString(mSection.get(), "Name", mName.get());
bool isRelative = false;
@@ -264,6 +272,7 @@ nsToolkitProfile::nsToolkitProfile(const nsACString& aName, nsIFile* aRootDir,
@@ -268,6 +273,7 @@ nsToolkitProfile::nsToolkitProfile(const nsACString& aName, nsIFile* aRootDir,
db->SetString(mSection.get(), "IsRelative", isRelative ? "1" : "0");
db->SetString(mSection.get(), "Path", descriptor.get());
+ db->SetString(mSection.get(), "ZenAvatarPath", mZenAvatarPath.get());
}
}
@@ -318,6 +327,8 @@ nsToolkitProfile::SetName(const nsACString& aName) {
return NS_OK;
if (!mStoreID.IsVoid()) {
db->SetString(mSection.get(), "StoreID",
PromiseFlatCString(mStoreID).get());
@@ -466,6 +472,8 @@ nsToolkitProfile::SetShowProfileSelector(bool aShowProfileSelector) {
#endif
}
+#include "zenProfileMethodsOverride.inc.cpp"
@ -60,11 +49,12 @@ index aeab25c61f3b04cfa19ec93e2abe0772d8656e61..b4ada9432abda484dc54a04e2993745d
nsresult nsToolkitProfile::RemoveInternal(bool aRemoveFiles,
bool aInBackground) {
NS_ASSERTION(nsToolkitProfileService::gService, "Whoa, my service is gone.");
@@ -992,7 +1003,15 @@ nsresult nsToolkitProfileService::Init() {
localDir = rootDir;
@@ -1158,8 +1166,15 @@ nsresult nsToolkitProfileService::Init() {
}
}
- currentProfile = new nsToolkitProfile(name, rootDir, localDir, true);
- currentProfile = new nsToolkitProfile(name, rootDir, localDir, true,
- storeID, showProfileSelector);
+ nsAutoCString zenProfileAvatar;
+
+ rv = mProfileDB.GetString(profileID.get(), "ZenAvatarPath", zenProfileAvatar);
@ -73,11 +63,11 @@ index aeab25c61f3b04cfa19ec93e2abe0772d8656e61..b4ada9432abda484dc54a04e2993745d
+ continue;
+ }
+
+ currentProfile = new nsToolkitProfile(name, rootDir, localDir, true, zenProfileAvatar);
+ currentProfile = new nsToolkitProfile(name, rootDir, localDir, true, zenProfileAvatar, storeID, showProfileSelector);
// If a user has modified the ini file path it may make for a valid profile
// path but not match what we would have serialised and so may not match
@@ -1211,7 +1230,7 @@ nsresult nsToolkitProfileService::CreateDefaultProfile(
@@ -1384,7 +1399,7 @@ nsresult nsToolkitProfileService::CreateDefaultProfile(
if (mUseDevEditionProfile) {
name.AssignLiteral(DEV_EDITION_NAME);
} else if (mUseDedicatedProfile) {
@ -86,7 +76,7 @@ index aeab25c61f3b04cfa19ec93e2abe0772d8656e61..b4ada9432abda484dc54a04e2993745d
} else {
name.AssignLiteral(DEFAULT_NAME);
}
@@ -1995,7 +2014,7 @@ nsToolkitProfileService::CreateProfile(nsIFile* aRootDir,
@@ -2180,7 +2195,7 @@ nsToolkitProfileService::CreateProfile(nsIFile* aRootDir,
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIToolkitProfile> profile =

View file

@ -1,17 +1,17 @@
diff --git a/toolkit/profile/nsToolkitProfileService.h b/toolkit/profile/nsToolkitProfileService.h
index 9de18b8ae349853f4f78b92d1a0b485add4e716e..b8a051cb5fd4c7a26af5377c1398d9a270985920 100644
index d48fd954a14a8dcb4654e10cd3c792c95d38647d..be4dcf3962b77572c8cfe04d6043551f55650f9a 100644
--- a/toolkit/profile/nsToolkitProfileService.h
+++ b/toolkit/profile/nsToolkitProfileService.h
@@ -30,7 +30,7 @@ class nsToolkitProfile final
~nsToolkitProfile() = default;
nsToolkitProfile(const nsACString& aName, nsIFile* aRootDir,
- nsIFile* aLocalDir, bool aFromDB);
+ nsIFile* aLocalDir, bool aFromDB, const nsACString& aZenAvatarPath);
- nsIFile* aLocalDir, bool aFromDB, const nsACString& aStoreID,
+ nsIFile* aLocalDir, bool aFromDB, const nsACString& aZenAvatarPath, const nsACString& aStoreID,
bool aShowProfileSelector);
nsresult RemoveInternal(bool aRemoveFiles, bool aInBackground);
@@ -42,6 +42,7 @@ class nsToolkitProfile final
@@ -45,6 +45,7 @@ class nsToolkitProfile final
nsIProfileLock* mLock;
uint32_t mIndex;
nsCString mSection;

View file

@ -5,7 +5,7 @@
"binaryName": "zen",
"version": {
"product": "firefox",
"version": "129.0.2"
"version": "130.0"
},
"buildOptions": {
"generateBranding": true