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

feat: Added support for global window scheme, b=no-bug, c=common, workspaces

This commit is contained in:
mr. m 2025-06-23 18:09:22 +02:00
parent 3c3d7aa994
commit f27df1a5bd
No known key found for this signature in database
GPG key ID: 928E01ED4C97749F
14 changed files with 178 additions and 159 deletions

2
l10n

@ -1 +1 @@
Subproject commit 706b33337345e4231e18313463259703b3fbc50d
Subproject commit 7435b28bdf962406f7e0ec54ed1774ede5b490a9

View file

@ -7,6 +7,7 @@ pref('zen.theme.content-element-separation', 8); // In pixels
pref('zen.theme.gradient', true);
pref('zen.theme.gradient.show-custom-colors', false);
pref('zen.theme.essentials-favicon-bg', true);
pref('zen.theme.window.scheme', 'auto'); // auto, light, dark
#ifdef XP_MACOSX
pref('zen.theme.border-radius', 10); // In pixels

View file

@ -20,9 +20,12 @@
</hbox>
</hbox>
<hbox class="zen-theme-picker-gradient">
<box id="PanelUI-zen-gradient-generator-rotation-dot"></box>
<box id="PanelUI-zen-gradient-generator-rotation-line"></box>
<box id="PanelUI-zen-gradient-generator-color-actions">
<hbox id="PanelUI-zen-gradient-generator-scheme">
<button id="PanelUI-zen-gradient-generator-scheme-auto" class="subviewbutton"/>
<button id="PanelUI-zen-gradient-generator-scheme-light" class="subviewbutton"/>
<button id="PanelUI-zen-gradient-generator-scheme-dark" class="subviewbutton"/>
</hbox>
<hbox id="PanelUI-zen-gradient-generator-color-actions">
<button id="PanelUI-zen-gradient-generator-color-add" class="subviewbutton">
</button>
<button id="PanelUI-zen-gradient-generator-color-remove" class="subviewbutton">
@ -30,13 +33,12 @@
<html:div class="separator"></html:div>
<button id="PanelUI-zen-gradient-generator-color-toggle-algo" class="subviewbutton" data-l10n-id="zen-panel-ui-gradient-generator-algo-floating">
</button>
</box>
</hbox>
<label data-l10n-id="zen-panel-ui-gradient-click-to-add" id="PanelUI-zen-gradient-generator-color-click-to-add"></label>
</hbox>
<hbox id="PanelUI-zen-gradient-generator-controls">
<hbox id="PanelUI-zen-gradient-colors-wrapper">
<vbox flex="1">
<label data-l10n-id="zen-panel-ui-gradient-generator-opacity-text"></label>
<html:input type="range" min="0.15" max="0.85" value="0.5" step="0.05" id="PanelUI-zen-gradient-generator-opacity" />
</vbox>
<vbox id="PanelUI-zen-gradient-generator-texture-wrapper">

View file

@ -768,3 +768,33 @@
background: transparent !important;
}
}
#PanelUI-zen-gradient-generator-scheme-auto {
list-style-image: url('sparkles.svg');
}
@media -moz-pref('zen.theme.window.scheme', 'auto') {
#PanelUI-zen-gradient-generator-scheme-auto {
background: light-dark(rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.2));
}
}
#PanelUI-zen-gradient-generator-scheme-dark {
list-style-image: url('moon-stars.svg');
}
@media -moz-pref('zen.theme.window.scheme', 'dark') {
#PanelUI-zen-gradient-generator-scheme-dark {
background: light-dark(rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.2));
}
}
#PanelUI-zen-gradient-generator-scheme-light {
list-style-image: url('face-sun.svg');
}
@media -moz-pref('zen.theme.window.scheme', 'light') {
#PanelUI-zen-gradient-generator-scheme-light {
background: light-dark(rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.2));
}
}

View file

@ -35,15 +35,16 @@
skin/classic/browser/zen-icons/edit-paste.svg (../shared/zen-icons/lin/edit-paste.svg)
skin/classic/browser/zen-icons/edit-redo.svg (../shared/zen-icons/lin/edit-redo.svg)
skin/classic/browser/zen-icons/edit-select-all.svg (../shared/zen-icons/lin/edit-select-all.svg)
skin/classic/browser/zen-icons/edit.svg (../shared/zen-icons/lin/edit.svg)
skin/classic/browser/zen-icons/edit-theme.svg (../shared/zen-icons/lin/edit-theme.svg)
skin/classic/browser/zen-icons/edit-undo.svg (../shared/zen-icons/lin/edit-undo.svg)
skin/classic/browser/zen-icons/edit.svg (../shared/zen-icons/lin/edit.svg)
skin/classic/browser/zen-icons/essential-add.svg (../shared/zen-icons/lin/essential-add.svg)
skin/classic/browser/zen-icons/essential-remove.svg (../shared/zen-icons/lin/essential-remove.svg)
skin/classic/browser/zen-icons/expand-sidebar.svg (../shared/zen-icons/lin/expand-sidebar.svg)
skin/classic/browser/zen-icons/ext-link.svg (../shared/zen-icons/lin/ext-link.svg)
skin/classic/browser/zen-icons/extension-blocked.svg (../shared/zen-icons/lin/extension-blocked.svg)
skin/classic/browser/zen-icons/extension.svg (../shared/zen-icons/lin/extension.svg)
skin/classic/browser/zen-icons/ext-link.svg (../shared/zen-icons/lin/ext-link.svg)
skin/classic/browser/zen-icons/face-sun.svg (../shared/zen-icons/lin/face-sun.svg)
skin/classic/browser/zen-icons/firefox.svg (../shared/zen-icons/lin/firefox.svg)
skin/classic/browser/zen-icons/folder.svg (../shared/zen-icons/lin/folder.svg)
skin/classic/browser/zen-icons/forget.svg (../shared/zen-icons/lin/forget.svg)
@ -80,6 +81,7 @@
skin/classic/browser/zen-icons/microphone-fill.svg (../shared/zen-icons/lin/microphone-fill.svg)
skin/classic/browser/zen-icons/microphone.svg (../shared/zen-icons/lin/microphone.svg)
skin/classic/browser/zen-icons/midi.svg (../shared/zen-icons/lin/midi.svg)
skin/classic/browser/zen-icons/moon-stars.svg (../shared/zen-icons/lin/moon-stars.svg)
skin/classic/browser/zen-icons/move-tab.svg (../shared/zen-icons/lin/move-tab.svg)
skin/classic/browser/zen-icons/new-tab-image.svg (../shared/zen-icons/lin/new-tab-image.svg)
skin/classic/browser/zen-icons/open.svg (../shared/zen-icons/lin/open.svg)
@ -95,27 +97,28 @@
skin/classic/browser/zen-icons/pocket-outline.svg (../shared/zen-icons/lin/pocket-outline.svg)
skin/classic/browser/zen-icons/popup.svg (../shared/zen-icons/lin/popup.svg)
skin/classic/browser/zen-icons/print.svg (../shared/zen-icons/lin/print.svg)
skin/classic/browser/zen-icons/privateBrowsing.svg (../shared/zen-icons/lin/privateBrowsing.svg)
skin/classic/browser/zen-icons/private-window.svg (../shared/zen-icons/lin/private-window.svg)
skin/classic/browser/zen-icons/privateBrowsing.svg (../shared/zen-icons/lin/privateBrowsing.svg)
skin/classic/browser/zen-icons/reader-mode.svg (../shared/zen-icons/lin/reader-mode.svg)
skin/classic/browser/zen-icons/reload.svg (../shared/zen-icons/lin/reload.svg)
skin/classic/browser/zen-icons/reload-to-stop.svg (../shared/zen-icons/lin/reload-to-stop.svg)
skin/classic/browser/zen-icons/reload.svg (../shared/zen-icons/lin/reload.svg)
skin/classic/browser/zen-icons/report.svg (../shared/zen-icons/lin/report.svg)
skin/classic/browser/zen-icons/save.svg (../shared/zen-icons/lin/save.svg)
skin/classic/browser/zen-icons/screen-blocked.svg (../shared/zen-icons/lin/screen-blocked.svg)
skin/classic/browser/zen-icons/screenshot.svg (../shared/zen-icons/lin/screenshot.svg)
skin/classic/browser/zen-icons/screen.svg (../shared/zen-icons/lin/screen.svg)
skin/classic/browser/zen-icons/screenshot.svg (../shared/zen-icons/lin/screenshot.svg)
skin/classic/browser/zen-icons/search-glass.svg (../shared/zen-icons/lin/search-glass.svg)
skin/classic/browser/zen-icons/search-page.svg (../shared/zen-icons/lin/search-page.svg)
skin/classic/browser/zen-icons/security-broken.svg (../shared/zen-icons/lin/security-broken.svg)
skin/classic/browser/zen-icons/security.svg (../shared/zen-icons/lin/security.svg)
skin/classic/browser/zen-icons/security-warning.svg (../shared/zen-icons/lin/security-warning.svg)
skin/classic/browser/zen-icons/security.svg (../shared/zen-icons/lin/security.svg)
skin/classic/browser/zen-icons/send-to-device.svg (../shared/zen-icons/lin/send-to-device.svg)
skin/classic/browser/zen-icons/settings.svg (../shared/zen-icons/lin/settings.svg)
skin/classic/browser/zen-icons/share.svg (../shared/zen-icons/lin/share.svg)
skin/classic/browser/zen-icons/sidebars-right.svg (../shared/zen-icons/lin/sidebars-right.svg)
skin/classic/browser/zen-icons/sidebar.svg (../shared/zen-icons/lin/sidebar.svg)
skin/classic/browser/zen-icons/sidebars-right.svg (../shared/zen-icons/lin/sidebars-right.svg)
skin/classic/browser/zen-icons/source-code.svg (../shared/zen-icons/lin/source-code.svg)
skin/classic/browser/zen-icons/sparkles.svg (../shared/zen-icons/lin/sparkles.svg)
skin/classic/browser/zen-icons/spell-check.svg (../shared/zen-icons/lin/spell-check.svg)
skin/classic/browser/zen-icons/split.svg (../shared/zen-icons/lin/split.svg)
skin/classic/browser/zen-icons/stop-to-reload.svg (../shared/zen-icons/lin/stop-to-reload.svg)
@ -174,15 +177,16 @@
skin/classic/browser/zen-icons/edit-paste.svg (../shared/zen-icons/lin/edit-paste.svg)
skin/classic/browser/zen-icons/edit-redo.svg (../shared/zen-icons/lin/edit-redo.svg)
skin/classic/browser/zen-icons/edit-select-all.svg (../shared/zen-icons/lin/edit-select-all.svg)
skin/classic/browser/zen-icons/edit.svg (../shared/zen-icons/lin/edit.svg)
skin/classic/browser/zen-icons/edit-theme.svg (../shared/zen-icons/lin/edit-theme.svg)
skin/classic/browser/zen-icons/edit-undo.svg (../shared/zen-icons/lin/edit-undo.svg)
skin/classic/browser/zen-icons/edit.svg (../shared/zen-icons/lin/edit.svg)
skin/classic/browser/zen-icons/essential-add.svg (../shared/zen-icons/lin/essential-add.svg)
skin/classic/browser/zen-icons/essential-remove.svg (../shared/zen-icons/lin/essential-remove.svg)
skin/classic/browser/zen-icons/expand-sidebar.svg (../shared/zen-icons/lin/expand-sidebar.svg)
skin/classic/browser/zen-icons/ext-link.svg (../shared/zen-icons/lin/ext-link.svg)
skin/classic/browser/zen-icons/extension-blocked.svg (../shared/zen-icons/lin/extension-blocked.svg)
skin/classic/browser/zen-icons/extension.svg (../shared/zen-icons/lin/extension.svg)
skin/classic/browser/zen-icons/ext-link.svg (../shared/zen-icons/lin/ext-link.svg)
skin/classic/browser/zen-icons/face-sun.svg (../shared/zen-icons/lin/face-sun.svg)
skin/classic/browser/zen-icons/firefox.svg (../shared/zen-icons/lin/firefox.svg)
skin/classic/browser/zen-icons/folder.svg (../shared/zen-icons/lin/folder.svg)
skin/classic/browser/zen-icons/forget.svg (../shared/zen-icons/lin/forget.svg)
@ -219,6 +223,7 @@
skin/classic/browser/zen-icons/microphone-fill.svg (../shared/zen-icons/lin/microphone-fill.svg)
skin/classic/browser/zen-icons/microphone.svg (../shared/zen-icons/lin/microphone.svg)
skin/classic/browser/zen-icons/midi.svg (../shared/zen-icons/lin/midi.svg)
skin/classic/browser/zen-icons/moon-stars.svg (../shared/zen-icons/lin/moon-stars.svg)
skin/classic/browser/zen-icons/move-tab.svg (../shared/zen-icons/lin/move-tab.svg)
skin/classic/browser/zen-icons/new-tab-image.svg (../shared/zen-icons/lin/new-tab-image.svg)
skin/classic/browser/zen-icons/open.svg (../shared/zen-icons/lin/open.svg)
@ -234,27 +239,28 @@
skin/classic/browser/zen-icons/pocket-outline.svg (../shared/zen-icons/lin/pocket-outline.svg)
skin/classic/browser/zen-icons/popup.svg (../shared/zen-icons/lin/popup.svg)
skin/classic/browser/zen-icons/print.svg (../shared/zen-icons/lin/print.svg)
skin/classic/browser/zen-icons/privateBrowsing.svg (../shared/zen-icons/lin/privateBrowsing.svg)
skin/classic/browser/zen-icons/private-window.svg (../shared/zen-icons/lin/private-window.svg)
skin/classic/browser/zen-icons/privateBrowsing.svg (../shared/zen-icons/lin/privateBrowsing.svg)
skin/classic/browser/zen-icons/reader-mode.svg (../shared/zen-icons/lin/reader-mode.svg)
skin/classic/browser/zen-icons/reload.svg (../shared/zen-icons/lin/reload.svg)
skin/classic/browser/zen-icons/reload-to-stop.svg (../shared/zen-icons/lin/reload-to-stop.svg)
skin/classic/browser/zen-icons/reload.svg (../shared/zen-icons/lin/reload.svg)
skin/classic/browser/zen-icons/report.svg (../shared/zen-icons/lin/report.svg)
skin/classic/browser/zen-icons/save.svg (../shared/zen-icons/lin/save.svg)
skin/classic/browser/zen-icons/screen-blocked.svg (../shared/zen-icons/lin/screen-blocked.svg)
skin/classic/browser/zen-icons/screenshot.svg (../shared/zen-icons/lin/screenshot.svg)
skin/classic/browser/zen-icons/screen.svg (../shared/zen-icons/lin/screen.svg)
skin/classic/browser/zen-icons/screenshot.svg (../shared/zen-icons/lin/screenshot.svg)
skin/classic/browser/zen-icons/search-glass.svg (../shared/zen-icons/lin/search-glass.svg)
skin/classic/browser/zen-icons/search-page.svg (../shared/zen-icons/lin/search-page.svg)
skin/classic/browser/zen-icons/security-broken.svg (../shared/zen-icons/lin/security-broken.svg)
skin/classic/browser/zen-icons/security.svg (../shared/zen-icons/lin/security.svg)
skin/classic/browser/zen-icons/security-warning.svg (../shared/zen-icons/lin/security-warning.svg)
skin/classic/browser/zen-icons/security.svg (../shared/zen-icons/lin/security.svg)
skin/classic/browser/zen-icons/send-to-device.svg (../shared/zen-icons/lin/send-to-device.svg)
skin/classic/browser/zen-icons/settings.svg (../shared/zen-icons/lin/settings.svg)
skin/classic/browser/zen-icons/share.svg (../shared/zen-icons/lin/share.svg)
skin/classic/browser/zen-icons/sidebars-right.svg (../shared/zen-icons/lin/sidebars-right.svg)
skin/classic/browser/zen-icons/sidebar.svg (../shared/zen-icons/lin/sidebar.svg)
skin/classic/browser/zen-icons/sidebars-right.svg (../shared/zen-icons/lin/sidebars-right.svg)
skin/classic/browser/zen-icons/source-code.svg (../shared/zen-icons/lin/source-code.svg)
skin/classic/browser/zen-icons/sparkles.svg (../shared/zen-icons/lin/sparkles.svg)
skin/classic/browser/zen-icons/spell-check.svg (../shared/zen-icons/lin/spell-check.svg)
skin/classic/browser/zen-icons/split.svg (../shared/zen-icons/lin/split.svg)
skin/classic/browser/zen-icons/stop-to-reload.svg (../shared/zen-icons/lin/stop-to-reload.svg)
@ -313,15 +319,16 @@
skin/classic/browser/zen-icons/edit-paste.svg (../shared/zen-icons/lin/edit-paste.svg)
skin/classic/browser/zen-icons/edit-redo.svg (../shared/zen-icons/lin/edit-redo.svg)
skin/classic/browser/zen-icons/edit-select-all.svg (../shared/zen-icons/lin/edit-select-all.svg)
skin/classic/browser/zen-icons/edit.svg (../shared/zen-icons/lin/edit.svg)
skin/classic/browser/zen-icons/edit-theme.svg (../shared/zen-icons/lin/edit-theme.svg)
skin/classic/browser/zen-icons/edit-undo.svg (../shared/zen-icons/lin/edit-undo.svg)
skin/classic/browser/zen-icons/edit.svg (../shared/zen-icons/lin/edit.svg)
skin/classic/browser/zen-icons/essential-add.svg (../shared/zen-icons/lin/essential-add.svg)
skin/classic/browser/zen-icons/essential-remove.svg (../shared/zen-icons/lin/essential-remove.svg)
skin/classic/browser/zen-icons/expand-sidebar.svg (../shared/zen-icons/lin/expand-sidebar.svg)
skin/classic/browser/zen-icons/ext-link.svg (../shared/zen-icons/lin/ext-link.svg)
skin/classic/browser/zen-icons/extension-blocked.svg (../shared/zen-icons/lin/extension-blocked.svg)
skin/classic/browser/zen-icons/extension.svg (../shared/zen-icons/lin/extension.svg)
skin/classic/browser/zen-icons/ext-link.svg (../shared/zen-icons/lin/ext-link.svg)
skin/classic/browser/zen-icons/face-sun.svg (../shared/zen-icons/lin/face-sun.svg)
skin/classic/browser/zen-icons/firefox.svg (../shared/zen-icons/lin/firefox.svg)
skin/classic/browser/zen-icons/folder.svg (../shared/zen-icons/lin/folder.svg)
skin/classic/browser/zen-icons/forget.svg (../shared/zen-icons/lin/forget.svg)
@ -358,6 +365,7 @@
skin/classic/browser/zen-icons/microphone-fill.svg (../shared/zen-icons/lin/microphone-fill.svg)
skin/classic/browser/zen-icons/microphone.svg (../shared/zen-icons/lin/microphone.svg)
skin/classic/browser/zen-icons/midi.svg (../shared/zen-icons/lin/midi.svg)
skin/classic/browser/zen-icons/moon-stars.svg (../shared/zen-icons/lin/moon-stars.svg)
skin/classic/browser/zen-icons/move-tab.svg (../shared/zen-icons/lin/move-tab.svg)
skin/classic/browser/zen-icons/new-tab-image.svg (../shared/zen-icons/lin/new-tab-image.svg)
skin/classic/browser/zen-icons/open.svg (../shared/zen-icons/lin/open.svg)
@ -373,27 +381,28 @@
skin/classic/browser/zen-icons/pocket-outline.svg (../shared/zen-icons/lin/pocket-outline.svg)
skin/classic/browser/zen-icons/popup.svg (../shared/zen-icons/lin/popup.svg)
skin/classic/browser/zen-icons/print.svg (../shared/zen-icons/lin/print.svg)
skin/classic/browser/zen-icons/privateBrowsing.svg (../shared/zen-icons/lin/privateBrowsing.svg)
skin/classic/browser/zen-icons/private-window.svg (../shared/zen-icons/lin/private-window.svg)
skin/classic/browser/zen-icons/privateBrowsing.svg (../shared/zen-icons/lin/privateBrowsing.svg)
skin/classic/browser/zen-icons/reader-mode.svg (../shared/zen-icons/lin/reader-mode.svg)
skin/classic/browser/zen-icons/reload.svg (../shared/zen-icons/lin/reload.svg)
skin/classic/browser/zen-icons/reload-to-stop.svg (../shared/zen-icons/lin/reload-to-stop.svg)
skin/classic/browser/zen-icons/reload.svg (../shared/zen-icons/lin/reload.svg)
skin/classic/browser/zen-icons/report.svg (../shared/zen-icons/lin/report.svg)
skin/classic/browser/zen-icons/save.svg (../shared/zen-icons/lin/save.svg)
skin/classic/browser/zen-icons/screen-blocked.svg (../shared/zen-icons/lin/screen-blocked.svg)
skin/classic/browser/zen-icons/screenshot.svg (../shared/zen-icons/lin/screenshot.svg)
skin/classic/browser/zen-icons/screen.svg (../shared/zen-icons/lin/screen.svg)
skin/classic/browser/zen-icons/screenshot.svg (../shared/zen-icons/lin/screenshot.svg)
skin/classic/browser/zen-icons/search-glass.svg (../shared/zen-icons/lin/search-glass.svg)
skin/classic/browser/zen-icons/search-page.svg (../shared/zen-icons/lin/search-page.svg)
skin/classic/browser/zen-icons/security-broken.svg (../shared/zen-icons/lin/security-broken.svg)
skin/classic/browser/zen-icons/security.svg (../shared/zen-icons/lin/security.svg)
skin/classic/browser/zen-icons/security-warning.svg (../shared/zen-icons/lin/security-warning.svg)
skin/classic/browser/zen-icons/security.svg (../shared/zen-icons/lin/security.svg)
skin/classic/browser/zen-icons/send-to-device.svg (../shared/zen-icons/lin/send-to-device.svg)
skin/classic/browser/zen-icons/settings.svg (../shared/zen-icons/lin/settings.svg)
skin/classic/browser/zen-icons/share.svg (../shared/zen-icons/lin/share.svg)
skin/classic/browser/zen-icons/sidebars-right.svg (../shared/zen-icons/lin/sidebars-right.svg)
skin/classic/browser/zen-icons/sidebar.svg (../shared/zen-icons/lin/sidebar.svg)
skin/classic/browser/zen-icons/sidebars-right.svg (../shared/zen-icons/lin/sidebars-right.svg)
skin/classic/browser/zen-icons/source-code.svg (../shared/zen-icons/lin/source-code.svg)
skin/classic/browser/zen-icons/sparkles.svg (../shared/zen-icons/lin/sparkles.svg)
skin/classic/browser/zen-icons/spell-check.svg (../shared/zen-icons/lin/spell-check.svg)
skin/classic/browser/zen-icons/split.svg (../shared/zen-icons/lin/split.svg)
skin/classic/browser/zen-icons/stop-to-reload.svg (../shared/zen-icons/lin/stop-to-reload.svg)

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="18px" height="18px" viewBox="0 0 18 18"><path d="M17.25,8.25h-1.292c-.146-1.369-.69-2.619-1.512-3.637l1.583-1.583c.293-.293,.293-.768,0-1.061s-.767-.294-1.061,0l-1.583,1.583c-1.018-.821-2.268-1.365-3.636-1.511V.75c0-.414-.336-.75-.75-.75s-.75,.336-.75,.75v1.292c-1.368,.146-2.618,.69-3.636,1.511l-1.583-1.583c-.293-.293-.768-.293-1.061,0s-.293,.768,0,1.061l1.583,1.583c-.821,1.018-1.365,2.268-1.511,3.637H.75c-.414,0-.75,.336-.75,.75s.336,.75,.75,.75h1.292c.146,1.369,.69,2.619,1.511,3.637l-1.583,1.583c-.293,.293-.293,.768,0,1.061,.146,.146,.338,.22,.53,.22,.191,0,.384-.073,.53-.22l1.583-1.583c1.018,.821,2.268,1.365,3.636,1.511v1.292c0,.414,.336,.75,.75,.75s.75-.336,.75-.75v-1.292c1.368-.146,2.618-.69,3.636-1.511l1.583,1.583c.146,.146,.338,.22,.53,.22s.384-.073,.53-.22c.293-.293,.293-.768,0-1.061l-1.583-1.583c.821-1.018,1.365-2.268,1.512-3.637h1.292c.414,0,.75-.336,.75-.75s-.336-.75-.75-.75Zm-11.25,1.75c-.552,0-1-.448-1-1s.448-1,1-1,1,.448,1,1-.448,1-1,1Zm3,2c-.828,0-1.5-.672-1.5-1.5,0-.276,.224-.5,.5-.5h2c.276,0,.5,.224,.5,.5,0,.828-.672,1.5-1.5,1.5Zm2-3c0-.552,.448-1,1-1s1,.448,1,1-.448,1-1,1-1-.448-1-1Z" fill="currentColor"></path></svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="18px" height="18px" viewBox="0 0 18 18"><path d="M16.705,10.223c-.246-.183-.578-.197-.838-.037-.868,.532-1.859,.813-2.867,.813-3.033,0-5.5-2.467-5.5-5.5,0-1.146,.354-2.247,1.023-3.186,.177-.249,.186-.581,.021-.839-.164-.258-.467-.386-.77-.334C3.994,1.847,1.25,5.152,1.25,9c0,4.411,3.589,8,8,8,3.638,0,6.819-2.461,7.735-5.986,.077-.296-.034-.609-.28-.791Z" fill="currentColor"></path><path d="M12.743,4.492l-.946-.315-.316-.947c-.102-.306-.609-.306-.711,0l-.316,.947-.946,.315c-.153,.051-.257,.194-.257,.356s.104,.305,.257,.356l.946,.315,.316,.947c.051,.153,.194,.256,.355,.256s.305-.104,.355-.256l.316-.947,.946-.315c.153-.051,.257-.194,.257-.356s-.104-.305-.257-.356Z" fill="currentColor" data-color="color-2"></path><circle cx="14.25" cy="7.75" r=".75" fill="currentColor" data-color="color-2"></circle></svg>

After

Width:  |  Height:  |  Size: 917 B

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="18px" height="18px" viewBox="0 0 18 18"><path d="M3.025,5.623c.068,.204,.26,.342,.475,.342s.406-.138,.475-.342l.421-1.263,1.263-.421c.204-.068,.342-.259,.342-.474s-.138-.406-.342-.474l-1.263-.421-.421-1.263c-.137-.408-.812-.408-.949,0l-.421,1.263-1.263,.421c-.204,.068-.342,.259-.342,.474s.138,.406,.342,.474l1.263,.421,.421,1.263Z" fill="currentColor" data-color="color-2"></path><path d="M16.525,8.803l-4.535-1.793-1.793-4.535c-.227-.572-1.168-.572-1.395,0l-1.793,4.535-4.535,1.793c-.286,.113-.475,.39-.475,.697s.188,.584,.475,.697l4.535,1.793,1.793,4.535c.113,.286,.39,.474,.697,.474s.584-.188,.697-.474l1.793-4.535,4.535-1.793c.286-.113,.475-.39,.475-.697s-.188-.584-.475-.697Z" fill="currentColor"></path></svg>

After

Width:  |  Height:  |  Size: 822 B

View file

@ -46,6 +46,8 @@
pointer-events: none;
isolation: isolate;
background: var(--zen-themed-toolbar-bg-transparent);
transition: background-color var(--inactive-window-transition);
&::after,
&::before {
@ -118,7 +120,7 @@
}
#zen-main-app-wrapper {
background: var(--zen-themed-toolbar-bg-transparent);
background: transparent;
/* See bug #8814, don't an overflow here as it causes issues
* with firefox's rendering of the tab bar */

View file

@ -401,6 +401,7 @@ menuseparator {
border-radius: calc(var(--zen-native-inner-radius) + 2px) !important;
background: light-dark(rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.1)) !important;
border: 1px solid light-dark(rgba(255, 255, 255, 0.15), rgba(0, 0, 0, 0.15)) !important;
color: var(--toolbar-color);
:root[zen-right-side='true'] & {
order: -1;

View file

@ -222,12 +222,11 @@
#main-window:not([chromehidden~='toolbar']) {
min-height: 495px !important;
@media (-moz-windows-mica) or (-moz-platform: macos) {
@media (-moz-windows-mica) or (-moz-platform: macos) {
background: transparent;
--zen-themed-toolbar-bg-transparent: transparent;
&[zen-should-be-dark-mode] {
color-scheme: light;
--zen-themed-toolbar-bg-transparent: rgba(255, 255, 255, 0.4);
--zen-themed-toolbar-bg-transparent: var(--zen-themed-browser-overlay-bg);
}
}
@ -235,8 +234,7 @@
background: transparent;
--zen-themed-toolbar-bg-transparent: transparent;
&[zen-should-be-dark-mode] {
color-scheme: light;
--zen-themed-toolbar-bg-transparent: rgba(255, 255, 255, 0.4);
--zen-themed-toolbar-bg-transparent: var(--zen-themed-browser-overlay-bg);
}
}
@ -249,6 +247,26 @@
color-scheme: light;
--tab-selected-color-scheme: light;
}
&,
& #tabbrowser-tabpanels,
& panel,
& menupopup {
@media -moz-pref('zen.theme.window.scheme', 'dark') {
color-scheme: dark;
}
@media -moz-pref('zen.theme.window.scheme', 'light') {
color-scheme: light;
}
@media -moz-pref('zen.theme.window.scheme', 'auto') {
color-scheme: light;
@media (-moz-system-dark-theme) {
color-scheme: dark;
}
}
}
}
@media (prefers-color-scheme: dark) {

View file

@ -7,7 +7,6 @@
static MAX_DOTS = 3;
currentOpacity = 0.5;
currentRotation = -45;
dots = [];
useAlgo = '';
#currentLightness = 50;
@ -56,10 +55,32 @@
this.initCustomColorInput();
this.initTextureInput();
this.initRotationInput();
this.initSchemeButtons();
const darkModeChange = this.handleDarkModeChange.bind(this);
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', darkModeChange);
XPCOMUtils.defineLazyPreferenceGetter(
this,
'windowSchemeType',
'zen.theme.window.scheme',
true,
darkModeChange
);
}
handleDarkModeChange(event) {
this.updateCurrentWorkspace();
}
get isDarkMode() {
switch (this.windowSchemeType) {
case 'dark':
return true;
case 'light':
return false;
default:
}
return window.matchMedia('(prefers-color-scheme: dark)').matches;
}
@ -148,49 +169,25 @@
this.customColorInput.addEventListener('keydown', this.onCustomColorKeydown.bind(this));
}
initRotationInput() {
const rotationInput = document.getElementById('PanelUI-zen-gradient-generator-rotation-dot');
this._onRotationMouseDown = this.onRotationMouseDown.bind(this);
this._onRotationMouseMove = this.onRotationMouseMove.bind(this);
this._onRotationMouseUp = this.onRotationMouseUp.bind(this);
rotationInput.addEventListener('mousedown', this._onRotationMouseDown);
}
onRotationMouseDown(event) {
event.preventDefault();
event.stopPropagation();
this._rotating = true;
document.addEventListener('mousemove', this._onRotationMouseMove);
document.addEventListener('mouseup', this._onRotationMouseUp);
}
onRotationMouseMove(event) {
event.preventDefault();
event.stopPropagation();
const rotationInput = document.getElementById('PanelUI-zen-gradient-generator-rotation-dot');
const containerRect = rotationInput.parentElement.getBoundingClientRect();
// We calculate the angle based on the mouse position and the center of the container
const rotation = Math.atan2(
event.clientY - containerRect.top - containerRect.height / 2,
event.clientX - containerRect.left - containerRect.width / 2
);
const endRotation = (rotation * 180) / Math.PI;
// Between 150 and 50, we don't update the rotation
if (!(endRotation < 45 || endRotation > 130)) {
return;
}
this.currentRotation = endRotation;
this.updateCurrentWorkspace();
}
onRotationMouseUp(event) {
event.preventDefault();
event.stopPropagation();
document.removeEventListener('mousemove', this._onRotationMouseMove);
document.removeEventListener('mouseup', this._onRotationMouseUp);
setTimeout(() => {
this._rotating = false;
}, 100);
initSchemeButtons() {
const buttons = document.getElementById('PanelUI-zen-gradient-generator-scheme');
buttons.addEventListener('click', (event) => {
const target = event.target.closest('.subviewbutton');
if (!target) {
return;
}
event.preventDefault();
event.stopPropagation();
const scheme = target.id.replace('PanelUI-zen-gradient-generator-scheme-', '');
if (!scheme) {
return;
}
if (this.currentScheme === scheme) {
return;
}
this.currentScheme = scheme;
Services.prefs.setStringPref('zen.theme.window.scheme', scheme);
});
}
initTextureInput() {
@ -346,8 +343,8 @@
// important: If any sort of sizing is changed, make sure changes are reflected here
const padding = 20;
const rect = {
width: 308,
height: 308,
width: 318,
height: 318,
};
const centerX = rect.width / 2;
const centerY = rect.height / 2;
@ -721,6 +718,9 @@
if (this._rotating) {
return;
}
if (event.target.closest('#PanelUI-zen-gradient-generator-scheme')) {
return;
}
event.preventDefault();
const target = event.target;
if (target.id === 'PanelUI-zen-gradient-generator-color-add') {
@ -1045,6 +1045,7 @@
this.useAlgo = themedColors[0]?.algorithm ?? '';
this.#currentLightness = themedColors[0]?.lightness ?? 70;
const rotation = -45; // TODO: Detect rotation based on the accent color
if (themedColors.length === 0) {
return forToolbar
? this.getToolbarModifiedBase()
@ -1053,8 +1054,8 @@
return this.getSingleRGBColor(themedColors[0], forToolbar);
} else if (themedColors.length === 2) {
return [
`linear-gradient(${this.currentRotation}deg, ${this.getSingleRGBColor(themedColors[0], forToolbar)} -30%, transparent 100%)`,
`linear-gradient(${this.currentRotation + 180}deg, ${this.getSingleRGBColor(themedColors[1], forToolbar)} -30%, transparent 100%)`,
`linear-gradient(${rotation}deg, ${this.getSingleRGBColor(themedColors[0], forToolbar)} -30%, transparent 100%)`,
`linear-gradient(${rotation + 180}deg, ${this.getSingleRGBColor(themedColors[1], forToolbar)} -30%, transparent 100%)`,
].join(', ');
} else {
let color1 = this.getSingleRGBColor(themedColors[2], forToolbar);
@ -1067,9 +1068,7 @@
`linear-gradient(to top, ${color3} -30%, transparent 60%)`,
].join(', ');
}
return [`linear-gradient(${this.currentRotation}deg, ${color1} -30%, ${color3} 100%)`].join(
', '
);
return [`linear-gradient(${rotation}deg, ${color1} -30%, ${color3} 100%)`].join(', ');
}
}
@ -1090,12 +1089,11 @@
return lum < minimalLum;
}
static getTheme(colors = [], opacity = 0.5, rotation = -45, texture = 0) {
static getTheme(colors = [], opacity = 0.5, texture = 0) {
return {
type: 'gradient',
gradientColors: colors ? colors.filter((color) => color) : [], // remove undefined
opacity,
rotation,
texture,
};
}
@ -1263,6 +1261,18 @@
}
}
if (this.isDarkMode) {
browser.document.documentElement.style.setProperty(
'--zen-themed-browser-overlay-bg',
'rgba(255, 255, 255, 0.4)'
);
} else {
browser.document.documentElement.style.setProperty(
'--zen-themed-browser-overlay-bg',
'rgba(0, 0, 0, 0.2)'
);
}
if (!skipUpdate) {
browser.document.documentElement.style.setProperty(
'--zen-main-browser-background-old',
@ -1312,7 +1322,6 @@
}
browser.gZenThemePicker.currentOpacity = workspaceTheme.opacity ?? 0.5;
browser.gZenThemePicker.currentRotation = workspaceTheme.rotation ?? -45;
browser.gZenThemePicker.currentTexture = workspaceTheme.texture ?? 0;
for (const button of browser.document.querySelectorAll(
@ -1359,35 +1368,6 @@
i = 0;
}
}
const numberOfColors = workspaceTheme.gradientColors?.length;
const rotationDot = browser.document.getElementById(
'PanelUI-zen-gradient-generator-rotation-dot'
);
const rotationLine = browser.document.getElementById(
'PanelUI-zen-gradient-generator-rotation-line'
);
if (numberOfColors > 1 && numberOfColors != 3) {
rotationDot.style.opacity = 1;
rotationLine.style.opacity = 1;
rotationDot.style.removeProperty('pointer-events');
const rotationPadding = 20;
const rotationParentWidth = rotationDot.parentElement.getBoundingClientRect().width;
const rotationDotPosition = this.currentRotation;
const rotationDotWidth = 30;
const rotationDotX =
Math.cos((rotationDotPosition * Math.PI) / 180) *
(rotationParentWidth / 2 - rotationDotWidth / 2);
const rotationDotY =
Math.sin((rotationDotPosition * Math.PI) / 180) *
(rotationParentWidth / 2 - rotationDotWidth / 2);
rotationDot.style.left = `${rotationParentWidth / 2 + rotationDotX - rotationPadding + rotationDotWidth / 4}px`;
rotationDot.style.top = `${rotationParentWidth / 2 + rotationDotY - rotationPadding + rotationDotWidth / 4}px`;
} else {
rotationDot.style.opacity = 0;
rotationLine.style.opacity = 0;
rotationDot.style.pointerEvents = 'none';
}
}
const gradient = browser.gZenThemePicker.getGradient(workspaceTheme.gradientColors);
@ -1421,7 +1401,7 @@
? dominantColor
: `rgb(${dominantColor[0]}, ${dominantColor[1]}, ${dominantColor[2]})`
);
let isDarkMode = window.matchMedia('(prefers-color-scheme: dark)').matches;
let isDarkMode = this.isDarkMode;
if (dominantColor !== this.getNativeAccentColor()) {
isDarkMode = browser.gZenThemePicker.shouldBeDarkMode(dominantColor);
browser.document.documentElement.setAttribute('zen-should-be-dark-mode', isDarkMode);
@ -1522,12 +1502,7 @@
lightness: this.#currentLightness,
};
});
const gradient = nsZenThemePicker.getTheme(
colors,
this.currentOpacity,
this.currentRotation,
this.currentTexture
);
const gradient = nsZenThemePicker.getTheme(colors, this.currentOpacity, this.currentTexture);
let currentWorkspace = await gZenWorkspaces.getActiveWorkspace();
if (!skipSave) {

View file

@ -885,7 +885,7 @@ var gZenWorkspaces = new (class extends ZenMultiWindowFeature {
this.activeWorkspace = activeWorkspace?.uuid;
try {
if (activeWorkspace) {
window.gZenThemePicker = new ZenThemePicker();
window.gZenThemePicker = new nsZenThemePicker();
await gZenThemePicker.onWorkspaceChange(activeWorkspace);
}
} catch (e) {
@ -2179,7 +2179,7 @@ var gZenWorkspaces = new (class extends ZenMultiWindowFeature {
uuid: gZenUIManager.generateUuidv4(),
icon: icon,
name: name,
theme: ZenThemePicker.getTheme([]),
theme: nsZenThemePicker.getTheme([]),
containerTabId,
};
if (moveTabs) {

View file

@ -5,7 +5,7 @@
*/
#PanelUI-zen-gradient-generator {
--panel-width: 330px;
--panel-width: 340px;
--panel-padding: 10px;
min-width: var(--panel-width);
}
@ -254,7 +254,8 @@
}
}
#PanelUI-zen-gradient-generator-color-actions {
#PanelUI-zen-gradient-generator-color-actions,
#PanelUI-zen-gradient-generator-scheme {
display: flex;
position: absolute;
bottom: 8px;
@ -272,6 +273,9 @@
min-width: fit-content !important;
transition: background 0.2s;
appearance: none;
max-height: 28px;
color: light-dark(rgba(0, 0, 0, 0.7), rgba(255, 255, 255, 0.9));
backdrop-filter: blur(5px);
& .button-box {
gap: 0.1rem;
@ -282,7 +286,7 @@
}
&:hover {
background: light-dark(#cfcfcf, #313131);
background: light-dark(rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.1));
}
&[disabled] {
@ -298,6 +302,10 @@
}
}
#PanelUI-zen-gradient-generator-scheme {
top: 10px;
}
@media not -moz-pref('zen.theme.gradient.show-custom-colors') {
#PanelUI-zen-gradient-generator-custom-colors {
display: none !important;
@ -379,33 +387,3 @@
}
}
}
#PanelUI-zen-gradient-generator-rotation-line {
border: 1px solid var(--zen-colors-border);
position: absolute;
--rotation-padding: 15px;
width: calc(100% - var(--rotation-padding) * 2);
border-bottom-color: transparent;
height: calc(100% - var(--rotation-padding) * 2);
top: var(--rotation-padding);
left: var(--rotation-padding);
border-radius: 50%;
opacity: 0;
pointer-events: none;
}
#PanelUI-zen-gradient-generator-rotation-dot {
position: absolute;
width: 25px;
height: 25px;
border-radius: 50%;
border: 1px solid var(--zen-colors-border);
background: var(--zen-colors-tertiary);
opacity: 0;
cursor: pointer;
z-index: 2;
transition: transform 0.1s;
&:hover {
transform: scale(1.1);
}
}