Compare commits

...

5 Commits

22 changed files with 4070 additions and 49 deletions

View File

@@ -95,6 +95,9 @@
- name: browser.search.widget.new - name: browser.search.widget.new
value: true value: true
- name: layout.css.corner-shape.enabled
value: true
# Disabled from https://searchfox.org/firefox-main/rev/d6bfff43852356ca98af848b4705d37f8d41856f/modules/libpref/init/StaticPrefList.yaml#2008 # Disabled from https://searchfox.org/firefox-main/rev/d6bfff43852356ca98af848b4705d37f8d41856f/modules/libpref/init/StaticPrefList.yaml#2008
# Only enabled for windows, doesn't really fit inside Zen. # Only enabled for windows, doesn't really fit inside Zen.
- name: browser.startup.preXulSkeletonUI - name: browser.startup.preXulSkeletonUI

View File

@@ -1,5 +1,5 @@
diff --git a/browser/base/content/navigator-toolbox.inc.xhtml b/browser/base/content/navigator-toolbox.inc.xhtml diff --git a/browser/base/content/navigator-toolbox.inc.xhtml b/browser/base/content/navigator-toolbox.inc.xhtml
index dd2f391096968564086911c532f696dc7ffb8ae1..3de617bf4fb7fa35f7d4d7b618e4673b72b953ee 100644 index dd2f391096968564086911c532f696dc7ffb8ae1..c968e5f0ebb5f0151fb124bafe10d8d5361e060f 100644
--- a/browser/base/content/navigator-toolbox.inc.xhtml --- a/browser/base/content/navigator-toolbox.inc.xhtml
+++ b/browser/base/content/navigator-toolbox.inc.xhtml +++ b/browser/base/content/navigator-toolbox.inc.xhtml
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
@@ -19,7 +19,7 @@ index dd2f391096968564086911c532f696dc7ffb8ae1..3de617bf4fb7fa35f7d4d7b618e4673b
</toolbar> </toolbar>
+<hbox id="titlebar"> +<hbox id="titlebar">
+ <html:div id="zen-toolbar-background" class="zen-toolbar-background zen-browser-generic-background"> + <html:div id="zen-toolbar-background" class="zen-toolbar-background zen-squircle-before zen-squircle-after zen-browser-generic-background">
+ <html:div class="zen-browser-grain" /> + <html:div class="zen-browser-grain" />
+ </html:div> + </html:div>
+ <box id="zen-overflow-extensions-list" skipintoolbarset="true" contextmenu="toolbar-context-menu" /> + <box id="zen-overflow-extensions-list" skipintoolbarset="true" contextmenu="toolbar-context-menu" />

View File

@@ -15,19 +15,23 @@
mainview-with-header="true"> mainview-with-header="true">
<hbox id="zen-site-data-header"> <hbox id="zen-site-data-header">
<toolbarbutton id="zen-site-data-header-share" <toolbarbutton id="zen-site-data-header-share"
class="zen-squircle-before"
data-l10n-id="zen-site-data-header-share" data-l10n-id="zen-site-data-header-share"
flex="1" flex="1"
closemenu="none" /> closemenu="none" />
<toolbarbutton id="zen-site-data-header-reader-mode" <toolbarbutton id="zen-site-data-header-reader-mode"
class="zen-squircle-before"
data-l10n-id="zen-site-data-header-reader-mode" data-l10n-id="zen-site-data-header-reader-mode"
command="View:ReaderView" command="View:ReaderView"
tooltip="dynamic-shortcut-tooltip" tooltip="dynamic-shortcut-tooltip"
flex="1" /> flex="1" />
<toolbarbutton id="zen-site-data-header-screenshot" <toolbarbutton id="zen-site-data-header-screenshot"
class="zen-squircle-before"
data-l10n-id="zen-site-data-header-screenshot" data-l10n-id="zen-site-data-header-screenshot"
command="Browser:Screenshot" command="Browser:Screenshot"
flex="1" /> flex="1" />
<toolbarbutton id="zen-site-data-header-bookmark" <toolbarbutton id="zen-site-data-header-bookmark"
class="zen-squircle-before"
data-l10n-id="zen-site-data-header-bookmark" data-l10n-id="zen-site-data-header-bookmark"
command="Browser:AddBookmarkAs" command="Browser:AddBookmarkAs"
flex="1" /> flex="1" />

View File

@@ -131,10 +131,10 @@
</box> </box>
<html:input type="range" value="0.4" step="0.001" id="PanelUI-zen-gradient-generator-opacity" <html:input type="range" value="0.4" step="0.001" id="PanelUI-zen-gradient-generator-opacity"
#ifdef XP_MACOSX #ifdef XP_MACOSX
max="0.9" max="0.8"
min="0.30" min="0.30"
#else #else
max="0.9" max="0.8"
min="0.25" min="0.25"
#endif #endif
/> />

File diff suppressed because it is too large Load Diff

View File

@@ -56,5 +56,19 @@
"type": "phabricator", "type": "phabricator",
"id": "D321446", "id": "D321446",
"name": "Issue 14710" "name": "Issue 14710"
},
{
"type": "local",
// CSS corner-shape rendering stack from bug 2047627 (borders),
// bug 2048908 (box shadows) and bug 2058091 (inset), squashed into a
// single patch: surfer's revert-then-apply on re-import only works for
// independently revertible patches, so a stack of separate files fails.
// Combined revisions, in stack order: D313684, D314332-D314337,
// D316301-D316304, D317056-D317058. The earlier revisions of these
// bugs (D306773-D306779, D308243, D311523) already landed in the
// current Firefox version and are omitted. D314332, D314336, D316301,
// D316303, D316304, D317057 and D317058 are hand-rebased onto
// Firefox 154 (the upstream diffs target a newer mozilla-central).
"path": "firefox/css_corner_shape_rendering.patch"
} }
] ]

View File

@@ -49,9 +49,9 @@
<vbox flex="1" id="zen-boost-filter-wrapper"> <vbox flex="1" id="zen-boost-filter-wrapper">
<hbox class="zen-boost-color-picker-gradient zen-boost-panel-disabled"> <hbox class="zen-boost-color-picker-gradient zen-boost-panel-disabled">
<button data-l10n-id="zen-boost-magic-theme" id="zen-boost-magic-theme" class="subviewbutton mod-button"></button> <button data-l10n-id="zen-boost-magic-theme" id="zen-boost-magic-theme" class="subviewbutton mod-button"></button>
<html:div id="zen-boost-color-picker-dot-primary" class="zen-boost-color-picker-dot"></html:div> <html:div id="zen-boost-color-picker-dot-primary" class="zen-boost-color-picker-dot no-squircles"></html:div>
<html:div id="zen-boost-color-picker-dot-secondary" class="zen-boost-color-picker-dot"></html:div> <html:div id="zen-boost-color-picker-dot-secondary" class="zen-boost-color-picker-dot no-squircles"></html:div>
<html:div class="zen-boost-color-picker-circle"></html:div> <html:div class="zen-boost-color-picker-circle no-squircles"></html:div>
</hbox> </hbox>
<hbox flex="1" id="zen-boost-toolbar-wrapper-colors"> <hbox flex="1" id="zen-boost-toolbar-wrapper-colors">

View File

@@ -194,7 +194,8 @@ body {
max-height: 40px; max-height: 40px;
align-items: center; align-items: center;
background-color: var(--zen-boosts-secondary-background); background-color: var(--zen-boosts-secondary-background);
border: solid 1px var(--zen-boosts-primary-border-color); border: solid 1px transparent;
border-bottom-color: var(--zen-boosts-primary-border-color);
@media (-moz-windows-mica) { @media (-moz-windows-mica) {
background-color: var(--zen-boosts-mica-background); background-color: var(--zen-boosts-mica-background);

View File

@@ -1348,18 +1348,21 @@ window.gZenVerticalTabsManager = {
document.documentElement.removeAttribute("zen-right-side"); document.documentElement.removeAttribute("zen-right-side");
} }
delete this._hadSidebarCollapse; const wasSidebarExpanded = document.documentElement.hasAttribute(
if (isSidebarExpanded) { "zen-sidebar-expanded"
this._hadSidebarCollapse = !document.documentElement.hasAttribute( );
"zen-sidebar-expanded" if (isSidebarExpanded !== wasSidebarExpanded) {
); delete this._hadSidebarCollapse;
this.navigatorToolbox.setAttribute("zen-sidebar-expanded", "true"); if (isSidebarExpanded) {
document.documentElement.setAttribute("zen-sidebar-expanded", "true"); this._hadSidebarCollapse = true;
gBrowser.tabContainer.setAttribute("expanded", "true"); this.navigatorToolbox.setAttribute("zen-sidebar-expanded", "true");
} else { document.documentElement.setAttribute("zen-sidebar-expanded", "true");
this.navigatorToolbox.removeAttribute("zen-sidebar-expanded"); gBrowser.tabContainer.setAttribute("expanded", "true");
document.documentElement.removeAttribute("zen-sidebar-expanded"); } else {
gBrowser.tabContainer.removeAttribute("expanded"); this.navigatorToolbox.removeAttribute("zen-sidebar-expanded");
document.documentElement.removeAttribute("zen-sidebar-expanded");
gBrowser.tabContainer.removeAttribute("expanded");
}
} }
const appContentNavbarContaienr = document.getElementById( const appContentNavbarContaienr = document.getElementById(

View File

@@ -717,6 +717,10 @@
display: none; display: none;
} }
.urlbarView {
overflow: visible;
}
#urlbar-search-mode-indicator-title { #urlbar-search-mode-indicator-title {
font-weight: 600; font-weight: 600;
padding: 0; padding: 0;

View File

@@ -335,7 +335,7 @@ menuseparator {
gap: 8px; gap: 8px;
z-index: 1000; z-index: 1000;
padding: var(--zen-toast-padding); padding: var(--zen-toast-padding);
border-radius: 10px; border-radius: 14px;
background: linear-gradient(to bottom, var(--zen-primary-color) -40%, color-mix(in srgb, var(--zen-primary-color), #0f0f0f 20%)); background: linear-gradient(to bottom, var(--zen-primary-color) -40%, color-mix(in srgb, var(--zen-primary-color), #0f0f0f 20%));
box-shadow: light-dark(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.4)) 0 0 22px 2px; box-shadow: light-dark(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.4)) 0 0 22px 2px;
border: none; border: none;
@@ -374,7 +374,7 @@ menuseparator {
min-width: unset !important; min-width: unset !important;
min-height: 28px; min-height: 28px;
margin: 0 !important; margin: 0 !important;
border-radius: 6px !important; border-radius: 10px !important;
border-top: 2px solid light-dark(transparent, rgba(255, 255, 255, 0.1)); border-top: 2px solid light-dark(transparent, rgba(255, 255, 255, 0.1));
color: light-dark(rgba(0, 0, 0, 0.8), rgba(255, 255, 255, 0.8)) !important; color: light-dark(rgba(0, 0, 0, 0.8), rgba(255, 255, 255, 0.8)) !important;
box-shadow: 0 0 1px 1px rgba(0, 0, 0, 0.05); box-shadow: 0 0 1px 1px rgba(0, 0, 0, 0.05);

View File

@@ -185,7 +185,7 @@
.toolbarbutton-1:not(#tabs-newtab-button), .toolbarbutton-1:not(#tabs-newtab-button),
.urlbar-page-action, .urlbar-page-action,
.identity-box-button { .identity-box-button {
--tab-border-radius: 6px; --tab-border-radius: 8px;
--toolbarbutton-border-radius: var(--tab-border-radius); --toolbarbutton-border-radius: var(--tab-border-radius);
--toolbarbutton-padding-inner: 6px; --toolbarbutton-padding-inner: 6px;
--toolbarbutton-padding-outer: 1px; --toolbarbutton-padding-outer: 1px;
@@ -601,6 +601,7 @@
position: absolute; position: absolute;
width: 100%; width: 100%;
height: 100%; height: 100%;
@media (-moz-platform: macos) { @media (-moz-platform: macos) {
background: linear-gradient(to bottom, light-dark(rgb(255, 255, 255), rgb(34, 34, 34)), light-dark(rgb(246, 246, 246), rgb(21, 21, 21))); background: linear-gradient(to bottom, light-dark(rgb(255, 255, 255), rgb(34, 34, 34)), light-dark(rgb(246, 246, 246), rgb(21, 21, 21)));

View File

@@ -217,6 +217,16 @@
--toolbarbutton-border-radius: 6px; --toolbarbutton-border-radius: 6px;
--urlbar-margin-inline: 1px !important; --urlbar-margin-inline: 1px !important;
--zen-squircle-value: 1.3;
@media (-moz-platform: windows) {
--zen-squircle-value: 2.1;
}
@media (-moz-platform: linux) {
--zen-squircle-value: 1.2;
}
--tab-icon-overlay-stroke: light-dark(white, black) !important; --tab-icon-overlay-stroke: light-dark(white, black) !important;
--tab-close-button-padding: 4px !important; --tab-close-button-padding: 4px !important;
@@ -348,3 +358,11 @@
} }
%include zen-buttons.css %include zen-buttons.css
@media (-moz-pref('layout.css.corner-shape.enabled')) {
*:not(.no-squircles),
.zen-squircle-before::before,
.zen-squircle-after::after {
corner-shape: superellipse(var(--zen-squircle-value));
}
}

View File

@@ -29,7 +29,7 @@
&, &,
&::before, &::before,
&::after { &::after {
border-radius: calc(var(--zen-native-inner-radius) - var(--zen-compact-mode-no-padding-radius-fix, 0px)); border-radius: calc((var(--zen-native-inner-radius) - var(--zen-compact-mode-no-padding-radius-fix, 0px)) * var(--zen-squircle-value));
} }
} }

View File

@@ -12,7 +12,7 @@ export class nsZenFolder extends MozTabbrowserTabGroup {
#initialized = false; #initialized = false;
static markup = ` static markup = `
<hbox class="tab-group-label-container zen-drop-target" pack="center"> <hbox class="tab-group-label-container zen-squircle-before zen-drop-target" pack="center">
<html:div class="tab-group-folder-icon"/> <html:div class="tab-group-folder-icon"/>
<label class="tab-group-label" role="button"/> <label class="tab-group-label" role="button"/>
<image class="tab-reset-button reset-icon" role="button" keyNav="false" data-l10n-id="zen-folders-unload-all-tooltip"/> <image class="tab-reset-button reset-icon" role="button" keyNav="false" data-l10n-id="zen-folders-unload-all-tooltip"/>

View File

@@ -41,11 +41,11 @@
&:hover { &:hover {
background: light-dark(rgb(41, 41, 41), rgb(204, 204, 204)); background: light-dark(rgb(41, 41, 41), rgb(204, 204, 204));
scale: 1.05; scale: 1.02;
} }
&:hover:active { &:hover:active {
scale: 0.95; scale: 0.98;
} }
& label { & label {

View File

@@ -4,8 +4,8 @@
<html:template id="zen-glance-sidebar-template"> <html:template id="zen-glance-sidebar-template">
<vbox class="zen-glance-sidebar-container"> <vbox class="zen-glance-sidebar-container">
<toolbarbutton class="zen-glance-sidebar-close toolbarbutton-1" command="cmd_zenGlanceClose" data-l10n-id="zen-general-confirm" /> <toolbarbutton class="no-squircles zen-glance-sidebar-close toolbarbutton-1" command="cmd_zenGlanceClose" data-l10n-id="zen-general-confirm" />
<toolbarbutton class="zen-glance-sidebar-open toolbarbutton-1" command="cmd_zenGlanceExpand" /> <toolbarbutton class="no-squircles zen-glance-sidebar-open toolbarbutton-1" command="cmd_zenGlanceExpand" />
<toolbarbutton class="zen-glance-sidebar-split toolbarbutton-1" command="cmd_zenGlanceSplit" /> <toolbarbutton class="no-squircles zen-glance-sidebar-split toolbarbutton-1" command="cmd_zenGlanceSplit" />
</vbox> </vbox>
</html:template> </html:template>

View File

@@ -52,7 +52,7 @@ export class nsZenWorkspace extends MozXULElement {
static get markup() { static get markup() {
return ` return `
<vbox class="zen-workspace-tabs-section zen-current-workspace-indicator zen-drop-target" flex="1" context="zenWorkspaceMoreActions"> <vbox class="zen-workspace-tabs-section zen-current-workspace-indicator zen-squircle-before zen-drop-target" flex="1" context="zenWorkspaceMoreActions">
<stack class="zen-current-workspace-indicator-stack"> <stack class="zen-current-workspace-indicator-stack">
<image class="zen-current-workspace-indicator-chevron" /> <image class="zen-current-workspace-indicator-chevron" />
<hbox class="zen-current-workspace-indicator-icon" /> <hbox class="zen-current-workspace-indicator-icon" />

View File

@@ -231,6 +231,13 @@
width: var(--zen-thumb-width); width: var(--zen-thumb-width);
cursor: pointer; cursor: pointer;
border: none; border: none;
transform: scale(1);
transform-origin: center;
transition: transform 0.5s;
}
&:hover::-moz-range-thumb {
transform: scale(1.1);
} }
&::-moz-range-track { &::-moz-range-track {
@@ -338,7 +345,7 @@
display: none; display: none;
} }
&:hover { &:not([disabled]):hover {
background: light-dark(rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.1)); background: light-dark(rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.1));
} }

View File

@@ -31,6 +31,7 @@
& toolbarbutton { & toolbarbutton {
margin: 0; margin: 0;
max-width: 28px; max-width: 28px;
border-radius: var(--toolbarbutton-border-radius);
height: 28px; height: 28px;
display: flex; display: flex;
justify-content: center; justify-content: center;

View File

@@ -358,7 +358,9 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature {
) { ) {
return; return;
} }
const currentView = this._data[this._lastOpenedTab.splitViewValue]; const currentView = this._data.find(group =>
group.tabs.includes(this._lastOpenedTab)
);
if (currentView?.tabs.length >= this.MAX_TABS) { if (currentView?.tabs.length >= this.MAX_TABS) {
return; return;
} }
@@ -543,7 +545,9 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature {
const panelsWidth = panelsRect.width; const panelsWidth = panelsRect.width;
const panelsHeight = panelsRect.height; const panelsHeight = panelsRect.height;
let numOfTabsToDivide = 2; let numOfTabsToDivide = 2;
const currentView = this._data[this._lastOpenedTab.splitViewValue]; const currentView = this._data.find(group =>
group.tabs.includes(this._lastOpenedTab)
);
if (currentView) { if (currentView) {
numOfTabsToDivide = currentView.tabs.length + 1; numOfTabsToDivide = currentView.tabs.length + 1;
} }
@@ -1106,7 +1110,6 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature {
*/ */
resetTabState(tab, forUnsplit) { resetTabState(tab, forUnsplit) {
tab.splitView = false; tab.splitView = false;
delete tab.splitViewValue;
tab.removeAttribute("split-view"); tab.removeAttribute("split-view");
tab.linkedBrowser.zenModeActive = false; tab.linkedBrowser.zenModeActive = false;
const container = tab.linkedBrowser.closest(".browserSidebarContainer"); const container = tab.linkedBrowser.closest(".browserSidebarContainer");
@@ -1150,6 +1153,8 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature {
} }
if (this.currentView === groupIndex) { if (this.currentView === groupIndex) {
this.deactivateCurrentSplitView(); this.deactivateCurrentSplitView();
} else if (this.currentView > groupIndex) {
this.currentView--;
} }
for (const tab of this._data[groupIndex].tabs) { for (const tab of this._data[groupIndex].tabs) {
this.resetTabState(tab, true); this.resetTabState(tab, true);
@@ -1641,7 +1646,6 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature {
applyGridToTabs(tabs) { applyGridToTabs(tabs) {
tabs.forEach(tab => { tabs.forEach(tab => {
tab.splitView = true; tab.splitView = true;
tab.splitViewValue = this.currentView;
tab.setAttribute("split-view", "true"); tab.setAttribute("split-view", "true");
const container = tab.linkedBrowser?.closest(".browserSidebarContainer"); const container = tab.linkedBrowser?.closest(".browserSidebarContainer");
container.setAttribute("is-zen-split", "true"); container.setAttribute("is-zen-split", "true");

View File

@@ -225,19 +225,9 @@
========================================================================== */ ========================================================================== */
#navigator-toolbox { #navigator-toolbox {
/* Define theme variables, including platform specifics for native look */ /* Define theme variables, including platform specifics for native look */
--border-radius-medium: 10px;
--tab-border-radius: 6px;
--zen-toolbox-min-width: 1px; --zen-toolbox-min-width: 1px;
--border-radius-medium: 14px;
@media (-moz-platform: windows) { --tab-border-radius: 8px;
--border-radius-medium: 6px;
--tab-border-radius: 4px;
}
@media (-moz-platform: macos) {
--border-radius-medium: 12px;
--tab-border-radius: 8px;
}
min-width: var(--zen-toolbox-min-width); min-width: var(--zen-toolbox-min-width);
margin-top: 0 !important; margin-top: 0 !important;
@@ -1208,6 +1198,8 @@
background-position: center; background-position: center;
fill: currentColor; fill: currentColor;
-moz-context-properties: fill, fill-opacity; -moz-context-properties: fill, fill-opacity;
/* stylelint-disable-next-line property-no-unknown */
corner-shape: superellipse(var(--zen-squircle-value));
} }
background: transparent; background: transparent;
@@ -1232,6 +1224,8 @@
z-index: 0; z-index: 0;
content: ""; content: "";
transition: background 0.1s ease-in-out; transition: background 0.1s ease-in-out;
/* stylelint-disable-next-line property-no-unknown */
corner-shape: superellipse(var(--zen-squircle-value));
} }
} }
@@ -1340,7 +1334,7 @@
#tabs-newtab-button:not([in-urlbar="true"]) label, #tabs-newtab-button:not([in-urlbar="true"]) label,
.zen-current-workspace-indicator-name { .zen-current-workspace-indicator-name {
opacity: 0.7; color: color-mix(in srgb, currentColor 70%, transparent);
} }
/* stylelint-disable-next-line media-query-no-invalid */ /* stylelint-disable-next-line media-query-no-invalid */