Compare commits

...

124 Commits

Author SHA1 Message Date
mauro-balades
232fa448ca Refactor subproject commit in zen-components and update keyboard shortcuts preferences 2024-09-22 23:37:16 +02:00
mauro-balades
3b6bf10f6a Refactor CSS for zen-compact-mode 2024-09-22 23:04:44 +02:00
mauro-balades
6f42c30abe Refactor ZenStartup.mjs and zen-settings.js, and update subproject commit in l10n and zen-components 2024-09-22 22:59:50 +02:00
mauro-balades
52d5a389bf Refactor ZenStartup.mjs and zen-settings.js, and update subproject commit in l10n and zen-components 2024-09-22 22:39:54 +02:00
mauro 🤙
5ee55ba672 Merge pull request #1609 from zen-browser/shortcuts-redo
Shortcuts redo
2024-09-22 22:22:58 +02:00
mauro 🤙
4332bf3b95 Merge branch 'main' into shortcuts-redo 2024-09-22 22:22:53 +02:00
mauro-balades
818ebd1d85 Refactor ZenStartup.mjs and zen-settings.js
- Refactor ZenStartup.mjs to use gZenKeyboardShortcutsManager instead of gZenKeyboardShortcuts.
- Refactor zen-settings.js to use async/await for _resetCKS and _handleKeyDown functions.
2024-09-22 22:13:46 +02:00
mauro-balades
e03d6dd3fd Update subproject commit in l10n and zen-components 2024-09-22 21:52:38 +02:00
mauro 🤙
bcfc6c43a2 Merge pull request #1608 from HarryHeres/fix/keybindings
[WIP] Syncing keybindings changes
2024-09-22 21:52:06 +02:00
Jan Hereš
11ff76d15b Merge branch 'shortcuts-redo' into fix/keybindings 2024-09-22 21:06:44 +02:00
HarryHeres
a94bcdf40c Working on the keybindings 2024-09-22 21:04:28 +02:00
mauro-balades
c29fdc99ea Fix styling issue with vertical tabs' pinned tabs container 2024-09-22 20:50:34 +02:00
mauro-balades
430aa1c6fd Fix styling issue with vertical tabs' pinned tabs container 2024-09-22 20:45:45 +02:00
mauro-balades
b9406728d3 Fix vertical tabs styling issue with pinned tabs container 2024-09-22 20:38:07 +02:00
mauro-balades
08cbf24b38 🔖 Update version to 1.0.1-a.3 2024-09-22 16:33:40 +00:00
mauro-balades
c3cae9e960 Update subproject commit in l10n and zen-components 2024-09-22 18:32:27 +02:00
mauro 🤙
1bbc73343c Merge pull request #1607 from BrhmDev/fix/copact-mode-and-expand-on-hover-conflicts
Fix compact mode and expand on hover conflicts in look and feel page
2024-09-22 18:30:13 +02:00
mauro-balades
dfcabbe9b4 Update subproject commit in zen-components 2024-09-22 18:28:00 +02:00
brahim
b0755d3834 Fix bug in look and feel where compact mode 'both' would never be selected on page load 2024-09-22 18:19:29 +02:00
mauro-balades
4cb7f3a105 Update dependencies and fix styling issues 2024-09-22 17:49:34 +02:00
brahim
960d733c76 Prevent settings page from getting in the wrong state when enabling expand on hover and compact-mode.hide-tabbar simultaneously 2024-09-22 17:13:13 +02:00
mauro-balades
051439abde Update Zen Browser theme and sidebar styling 2024-09-22 16:15:14 +02:00
mauro-balades
4b8c22d88b Update Zen Browser theme and sidebar styling 2024-09-22 15:14:34 +02:00
mauro-balades
35ecb5ef31 Merge branch 'main' of https://github.com/zen-browser/desktop 2024-09-22 13:43:20 +02:00
mauro-balades
f5132f33fb Update Betterfox version to 130 and enable dom.text_fragments 2024-09-22 13:43:18 +02:00
mauro 🤙
e5edc96919 Merge pull request #1597 from gunir/patch-2
Update better-fox.js - Remove sus tweaks
2024-09-22 13:38:35 +02:00
mauro 🤙
189ff89fd3 Update better-fox.js 2024-09-22 13:38:27 +02:00
mauro-balades
95cd749e3b Update subproject commit reference in zen-components 2024-09-22 13:36:12 +02:00
mauro-balades
bf4a9a7509 Refactor ZenStartup to update sidebar panel positioning for macOS 2024-09-22 13:21:49 +02:00
mauro-balades
7c047319d2 Refactor ZenUIManager to update sidebar panel positioning and subproject commit references 2024-09-22 13:06:14 +02:00
Gunir
059f4e5116 Update better-fox.js - Remove sus tweaks
Update better-fox.js - Remove sus tweaks
2024-09-22 09:18:15 +07:00
mauro-balades
59c8598b94 Refactor ZenUIManager to update sidebar panel positioning and trigger build update without rebuild in Zen Marketplace Manager 2024-09-21 18:26:18 +02:00
mauro-balades
c02505fe13 Refactor ZenUIManager to update sidebar panel positioning and trigger build update without rebuild in Zen Marketplace Manager 2024-09-21 18:05:56 +02:00
mauro-balades
5d718c4ce4 Update zen-workspaces.css to include height calculation for workspace buttons 2024-09-21 17:45:55 +02:00
mauro-balades
af5212e2c6 Update subproject commit references 2024-09-21 17:38:03 +02:00
mauro-balades
76c749d31a Refactor ZenUIManager to update sidebar panel positioning 2024-09-21 17:13:54 +02:00
mauro 🤙
3461dd1481 Merge pull request #1463 from BrhmDev/feature/resize-views-in-split-view
Resize views in split view
2024-09-21 17:02:33 +02:00
mauro 🤙
994fbf8d97 Merge branch 'main' into feature/resize-views-in-split-view 2024-09-21 17:02:25 +02:00
mauro-balades
2e40d34e01 Update l10n subproject commit 2024-09-21 17:01:39 +02:00
mauro-balades
bc64f3874f Refactor vertical-tabs.css to update padding-inline-start calculation 2024-09-21 17:00:57 +02:00
mauro-balades
a4edeb5b49 Refactor ZenUIManager to add event listener for gZenCompactModeManager 2024-09-21 16:58:22 +02:00
mauro-balades
4510bc64d6 Refactor ZenCompactModeManager and ZenStartup.mjs 2024-09-21 16:11:07 +02:00
mauro-balades
e4aa905440 Refactor ZenCompactModeManager and add ZenCompactMode.mjs 2024-09-21 14:31:25 +02:00
HarryHeres
faa9b2f763 Fixing macOS keybind issues 2024-09-21 13:58:06 +02:00
HarryHeres
76512840e3 Working on the macos-keybindings 2024-09-21 13:57:31 +02:00
mauro-balades
aef6c2ac48 Refactor ZenCompactModeManager and add ZenCompactMode.mjs 2024-09-21 13:24:06 +02:00
mauro 🤙
14f4dfc12a Merge pull request #1576 from BrhmDev/fix/add-general-popupTracking-method
Add method to gZenUIManager to track popups on any element
2024-09-21 13:21:10 +02:00
brahim
b06edc0dd9 Add removePopupTrackingAttribute method, refactor onPopupHidden. 2024-09-21 11:50:35 +02:00
brahim
863d087ae8 Add general gZenUIManager.addPopupTracking method to detect open popups on any element.
Add popup tracking to navbar container.
2024-09-21 11:50:35 +02:00
mauro 🤙
413c2819fb Merge pull request #1570 from JosueGalRe/main
fix(zenThemes): themes not being updated in other windows
2024-09-21 07:00:05 +02:00
Bryan Galdámez
cde7e77aea fix(zenThemes): themes not being updated in other windows 2024-09-20 22:22:36 -06:00
mauro 🤙
fa0a65f2e7 Merge pull request #1567 from JosueGalRe/main
feature(zen-settings): localize placeholder items
2024-09-20 21:23:57 +02:00
mauro 🤙
5649faf085 Merge pull request #1565 from BrhmDev/fix/compact-mode-getting-stuck-after-context-menu
Fix compact mode getting stuck on right click
2024-09-20 21:21:44 +02:00
Bryan Galdámez
dbe0124266 feature(zen-settings): localize placeholder items 2024-09-20 13:16:17 -06:00
brahim
3ebf3fdb67 Remove hardcoded popup ids from keepSidebarVisibleOnContextMenu 2024-09-20 20:42:30 +02:00
mauro-balades
3b426fa0cf Refactor ZenStartup to update default placements for sidebar buttons and improve sidebar buttons customization 2024-09-20 15:41:33 +02:00
mauro-balades
37e8ee66bd Refactor ZenStartup to update default placements for sidebar buttons and improve sidebar buttons customization 2024-09-20 14:23:49 +02:00
mauro-balades
1d220623ff Refactor ZenStartup to update default placements for sidebar buttons 2024-09-20 13:33:07 +02:00
mauro-balades
3219722c64 Refactor ZenStartup to update default placements for sidebar buttons 2024-09-20 10:00:14 +02:00
mauro-balades
42c04ca3da Refactor ZenStartup to update default placements for sidebar buttons 2024-09-19 23:28:10 +02:00
mauro-balades
e7110d3dbe Refactor ZenUIManager to improve sidebar buttons customization and handle sidebar visibility and expansion based on user preferences. 2024-09-19 23:18:18 +02:00
mauro-balades
4ef3ecf0d9 refactor(zen-sidebar): improve sidebar buttons customization
- Improved customization of sidebar buttons in the Zen sidebar.
- Adjusted padding and outer padding of toolbar buttons.
2024-09-19 21:05:37 +02:00
mauro-balades
7bdf52eab6 refactor(zen-sidebar): improve sidebar buttons customization
This commit refactors the code in ZenStartup.mjs to improve the customization of the sidebar buttons. It updates the toolbar structure and adds flexibility for customization. The changes also include modifications to the vertical-tabs.css file to remove commented out code.
2024-09-19 07:55:10 +02:00
mauro 🤙
0bdd8dce6c Merge pull request #1532 from BrhmDev/fix/keep-sidebar-visable-on-right-click
Fix: keep sidebar visable on right click in compact mode, vertical tabs (expand on hover)
2024-09-19 07:30:17 +02:00
mauro 🤙
4a7403e929 Merge pull request #1484 from JosueGalRe/main
Zen Mods: New properties config
2024-09-19 07:26:13 +02:00
Bryan Galdámez
bd7108e7df feature(zen-settings): localize hardcoded content 2024-09-18 20:50:12 -06:00
Bryan Galdámez
ed82f7d459 refactor(zen-settings): moved common utils to ZenThemesCommon 2024-09-18 17:39:28 -06:00
Bryan Galdámez
b5323b00ad Merge branch 'zen-browser:main' into main 2024-09-18 16:54:25 -06:00
brahim
4d4c2fd676 Merge branch 'main' into fix/keep-sidebar-visable-on-right-click
# Conflicts:
#	src/browser/base/content/zen-styles/zen-compact-mode.css
2024-09-19 00:40:24 +02:00
mauro-balades
787ea8c20d Update ZenUIManager and zen-urlbar.css 2024-09-18 23:02:03 +02:00
mauro-balades
d69d56850f Add ZenThemesCommon.mjs to zen-assets.jar.inc.mn 2024-09-18 22:30:09 +02:00
mauro-balades
b769fbb8fe Merge branch 'main' of https://github.com/zen-browser/desktop 2024-09-18 22:28:24 +02:00
mauro-balades
7bf77d1d57 Update subproject commit references 2024-09-18 22:05:35 +02:00
brahim
2d8f8be70b Fix sidebar still hiding because of tab-preview-panel close event 2024-09-18 19:38:03 +02:00
brahim
afb22905f9 Refactor: remove unnecessary sidebar contains check 2024-09-18 17:48:48 +02:00
brahim
15f733cd81 Fix: Also make has-popup-menu keep vertical-tabs visible, remove window dragging from vertical tabs, compact mode as it causes some weird behavior 2024-09-18 17:48:48 +02:00
brahim
2912e7c833 Refactor gZenCompactModeManager.keepSidebarVisibleOnContextMenu 2024-09-18 17:48:48 +02:00
brahim
4f88923d10 Fix: keep sidebar visible on right click in compact mode 2024-09-18 17:04:32 +02:00
mauro-balades
7eaa083c61 Update vertical-tabs.css, zen-urlbar.css, and zen-workspaces.css 2024-09-18 16:57:29 +02:00
Bryan Galdámez
f3a5ecd76b Merge branch 'zen-browser:main' into main 2024-09-18 00:47:09 -06:00
Bryan Galdámez
438b232ede fix(zen-settings): various fixes in mods rendering
- renamed some let to const
- conditionally render config button
- disable config button appearing on enable/disable on mods without preferences
- change mozToggle title based on state
2024-09-18 00:46:29 -06:00
Mauro Baladés
9d76fc8761 Update signing process to use SHA256 hash algorithm 2024-09-18 05:45:58 +03:00
Mauro Baladés
1cd57e08c0 Update update.xml files for version 1.0.1-a.2 2024-09-18 05:44:57 +03:00
Mauro Baladés
87b0ff952c Update update.xml files for version 1.0.1-a.2 2024-09-18 05:30:39 +03:00
mauro-balades
22043a0bf0 Update ZenStartup.mjs, zen-components, zen-theme.css, and zen-urlbar.css 2024-09-18 00:06:05 +02:00
mauro-balades
fe880279c9 Update toolbar button sizes and padding in zen-sidebar.css and vertical-tabs.css 2024-09-17 23:32:25 +02:00
mauro-balades
9c26c5aba8 Update toolbar button sizes and padding in zen-sidebar.css and vertical-tabs.css 2024-09-17 20:51:43 +02:00
mauro-balades
21b2ffb49a Update toolbar button sizes and padding in zen-sidebar.css and vertical-tabs.css 2024-09-17 20:43:34 +02:00
mauro-balades
1b8e850f03 🔖 Update version to 1.0.1-a.2 2024-09-17 18:33:41 +00:00
mauro-balades
bf52a194c8 Merge branch 'main' of https://github.com/zen-browser/desktop 2024-09-17 20:31:28 +02:00
mauro-balades
ab2e0c03b8 Fixed common bugs 2024-09-17 20:31:24 +02:00
mauro 🤙
800a46caca Merge pull request #1506 from gunir/patch-1
Update zen-browser.js
2024-09-17 18:16:44 +02:00
Gunir
e4dcbccce7 Update zen-browser.js 2024-09-17 21:31:01 +07:00
mauro-balades
ede39f37e6 Refactor vertical-tabs.css to adjust tab item height and add gap to scrollbox 2024-09-17 08:05:17 +02:00
Bryan Galdámez
7211024602 Merge branch 'main' of https://github.com/JosueGalRe/desktop 2024-09-16 22:41:20 -06:00
Bryan Galdámez
04599adfcc refactor(zenSettings): parse legacy settings using new format
- replace !<os> format with json property disabledOn
- added new default property
2024-09-16 22:38:54 -06:00
Mauro Baladés
01a63d0c70 Refactor update.xml to update displayVersion and appVersion to 1.0.1-a.1 2024-09-17 05:39:11 +03:00
mauro-balades
fafde6562a Refactor vertical-tabs.css to center align tab items 2024-09-16 23:19:13 +02:00
mauro-balades
843a383078 Merge branch 'main' of https://github.com/zen-browser/desktop 2024-09-16 23:09:16 +02:00
mauro-balades
379b1ca292 Refactor vertical-tabs.css to add margin to tab items 2024-09-16 23:09:10 +02:00
mauro-balades
36063ebdcd 🔖 Update version to 1.0.1-a.1 2024-09-16 21:03:03 +00:00
mauro-balades
05969ffeb6 🔖 Update version to 1.0.1-a.0 2024-09-16 21:01:49 +00:00
mauro-balades
7ade6ec0e0 Merge branch 'main' of https://github.com/zen-browser/desktop 2024-09-16 23:01:02 +02:00
mauro-balades
f355828240 Refactor version bumping in alpha workflow and surfer.json 2024-09-16 23:00:58 +02:00
mauro 🤙
3159536fb5 Merge pull request #1466 from JSGRD22/main
Add winget installation method for Windows in README
2024-09-16 23:00:10 +02:00
mauro-balades
2e3aa4865e 🔖 Update version to 1.0.2-0 2024-09-16 20:57:59 +00:00
mauro-balades
630d1a89c8 Refactor SURFER_COMPAT handling in sign.ps1 2024-09-16 22:53:54 +02:00
mauro 🤙
9f3a14a673 Merge pull request #1467 from JosueGalRe/main
feature: add string type theme property
2024-09-16 22:51:27 +02:00
Bryan Galdámez
fbc088225c Merge branch 'zen-browser:main' into main 2024-09-16 14:08:32 -06:00
Mauro Baladés
dcd9e0b94f Refactor SURFER_COMPAT handling in sign.ps1 2024-09-16 20:40:16 +03:00
Mauro Baladés
617a2c89cd Refactor unpacking of Windows build tar files 2024-09-16 20:32:04 +03:00
Mauro Baladés
de8a049e93 Update @zen-browser/surfer dependency to version 1.4.20 2024-09-16 20:31:36 +03:00
Bryan Galdámez
4f6e6e0e39 Merge branch 'zen-browser:main' into main 2024-09-16 10:53:12 -06:00
Mauro Baladés
f790e13f14 Refactor unpacking of Windows build tar files 2024-09-16 17:03:02 +03:00
Mauro Baladés
f1a18bb112 Merge branch 'main' of https://github.com/zen-browser/desktop 2024-09-16 16:47:36 +03:00
Mauro Baladés
4725b936c0 Signed windows builds 2024-09-16 16:46:58 +03:00
Bryan Galdámez
b7db0edf41 Merge branch 'zen-browser:main' into main 2024-09-16 01:21:36 -06:00
Bryan Galdámez
c49769a678 feature(zen-settings): add string type theme property 2024-09-16 01:21:01 -06:00
Jupiter
d9a95b9a8f Add winget installation method for Windows 2024-09-16 12:38:14 +08:00
brahim
d502555428 Remove --zen-split-grid-gap var 2024-09-16 04:15:21 +02:00
brahim
37ee485140 Add zen.splitView.min-resize-width pref 2024-09-16 04:15:21 +02:00
brahim
4cf7827df9 Move splitter css to zen-decks.css, use css vars for gridSizes 2024-09-16 04:15:21 +02:00
brahim
bd25205ad5 Split view splitter css 2024-09-16 04:15:20 +02:00
brahim
85c6de8d2a Put resize splitters inside tabBrowser 2024-09-16 04:15:20 +02:00
68 changed files with 1399 additions and 1072 deletions

1
.gitattributes vendored
View File

@@ -1,2 +1 @@
*.patch linguist-language=C++ *.patch linguist-language=C++
.github/workflows/object/*.tar.gz filter=lfs diff=lfs merge=lfs -text

View File

@@ -53,7 +53,7 @@ jobs:
- name: Bump version - name: Bump version
if: ${{ github.event.inputs.update_version == 'true' }} if: ${{ github.event.inputs.update_version == 'true' }}
run: | run: |
pnpm surfer ci --brand alpha --bump prepatch pnpm surfer ci --brand alpha --bump prerelease
- name: Bump version without new version - name: Bump version without new version
if: ${{ github.event.inputs.update_version == 'false' }} if: ${{ github.event.inputs.update_version == 'false' }}
@@ -317,23 +317,16 @@ jobs:
with: with:
submodules: recursive submodules: recursive
token: ${{ secrets.DEPLOY_KEY }} token: ${{ secrets.DEPLOY_KEY }}
lfs: true
- name: Git Pull - name: Git Pull
run: | run: |
git pull git pull
git lfs pull
- uses: actions/download-artifact@v4 - uses: actions/download-artifact@v4
- name: List - name: List
run: find . run: find .
- name: Unpack windows build (.tar.gz)
run: |
tar -xvf .github/workflows/object/windows-x64-signed-generic.tar.gz -C .
tar -xvf .github/workflows/object/windows-x64-signed-specific.tar.gz -C .
- name: Clone updates repo - name: Clone updates repo
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
@@ -348,8 +341,8 @@ jobs:
cp -a ../linux_update_manifest_generic/. updates/ cp -a ../linux_update_manifest_generic/. updates/
cp -a ../linux_update_manifest_specific/. updates/ cp -a ../linux_update_manifest_specific/. updates/
cp -a ../windows-x64-signed-generic/update_manifest/. updates/ cp -a ../.github/workflows/object/windows-x64-signed-generic/update_manifest/. updates/
cp -a ../windows-x64-signed-specific/update_manifest/. updates/ cp -a ../.github/workflows/object/windows-x64-signed-specific/update_manifest/. updates/
cp -a ../macos_update_manifest_aarch64/. updates/ cp -a ../macos_update_manifest_aarch64/. updates/
cp -a ../macos_update_manifest_x64/. updates/ cp -a ../macos_update_manifest_x64/. updates/
@@ -376,16 +369,16 @@ jobs:
zen-generic.AppImage.zsync zen-generic.AppImage.zsync
zen-specific.AppImage zen-specific.AppImage
zen-specific.AppImage.zsync zen-specific.AppImage.zsync
windows-x64-signed-generic/zen.win-generic.zip .github/workflows/object/windows-x64-signed-generic/zen.win-generic.zip
windows-x64-signed-specific/zen.win-specific.zip .github/workflows/object/windows-x64-signed-specific/zen.win-specific.zip
linux.mar linux.mar
linux-generic.mar linux-generic.mar
windows-x64-signed-generic/windows-generic.mar .github/workflows/object/windows-x64-signed-generic/windows-generic.mar
windows-x64-signed-specific/windows.mar .github/workflows/object/windows-x64-signed-specific/windows.mar
macos-x64.mar macos-x64.mar
macos-aarch64.mar macos-aarch64.mar
windows-x64-signed-specific/zen.installer.exe .github/workflows/object/windows-x64-signed-specific/zen.installer.exe
windows-x64-signed-generic/zen.installer-generic.exe .github/workflows/object/windows-x64-signed-generic/zen.installer-generic.exe
zen.macos-x64.dmg zen.macos-x64.dmg
zen.macos-aarch64.dmg zen.macos-aarch64.dmg

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:805f5d9f727596007dc64057d456e87a2648dff596230ca12af6cf48860843fa
size 237797081

View File

@@ -0,0 +1,6 @@
<?xml version="1.0"?>
<updates>
<update type="minor" displayVersion="1.0.1-a.2" appVersion="1.0.1-a.2" platformVersion="130.0" buildID="20240918002655">
<patch type="complete" URL="https://github.com/zen-browser/desktop/releases/download/1.0.1-a.2/windows-generic.mar" hashFunction="sha512" hashValue="75c5b879a4398dd28482e95ebc27e2eb922e040bb7efa3d1cb68a09165c694e2b8d58a09a0e8b7360ba8f667c9273b8d6132a49840f9df8711e614bc5ee8c913" size="72325896"/>
</update>
</updates>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0"?>
<updates>
<update type="minor" displayVersion="1.0.1-a.2" appVersion="1.0.1-a.2" platformVersion="130.0" buildID="20240918002655">
<patch type="complete" URL="https://github.com/zen-browser/desktop/releases/download/1.0.1-a.2/windows-generic.mar" hashFunction="sha512" hashValue="75c5b879a4398dd28482e95ebc27e2eb922e040bb7efa3d1cb68a09165c694e2b8d58a09a0e8b7360ba8f667c9273b8d6132a49840f9df8711e614bc5ee8c913" size="72325896"/>
</update>
</updates>

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:51d3bb5508804e438755658157f0f18331675b418bdb11db485f938a4fc5fd8a
size 237484305

View File

@@ -0,0 +1,6 @@
<?xml version="1.0"?>
<updates>
<update type="minor" displayVersion="1.0.1-a.2" appVersion="1.0.1-a.2" platformVersion="130.0" buildID="20240918002634">
<patch type="complete" URL="https://github.com/zen-browser/desktop/releases/download/1.0.1-a.2/windows.mar" hashFunction="sha512" hashValue="12f748e7eec386ea4d559d2cd6163cff94aa2adf058f7d1037434235ae1b09ed4ed9e524ea85d3d2f330878ad8bccf7c578ef7c32c79a5804333f6137bb0fe00" size="72311992"/>
</update>
</updates>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0"?>
<updates>
<update type="minor" displayVersion="1.0.1-a.2" appVersion="1.0.1-a.2" platformVersion="130.0" buildID="20240918002634">
<patch type="complete" URL="https://github.com/zen-browser/desktop/releases/download/1.0.1-a.2/windows.mar" hashFunction="sha512" hashValue="12f748e7eec386ea4d559d2cd6163cff94aa2adf058f7d1037434235ae1b09ed4ed9e524ea85d3d2f330878ad8bccf7c578ef7c32c79a5804333f6137bb0fe00" size="72311992"/>
</update>
</updates>

Binary file not shown.

View File

@@ -40,6 +40,24 @@ Zen is built with performance in mind, and we have optimized the browser to be a
Zen is available for Linux, macOS, and Windows. You can download the latest version from the official website at [zen-browser.app](https://zen-browser.app/download), or from the [GitHub Releases](https://github.com/zen-browser/desktop/releases) page. Zen is available for Linux, macOS, and Windows. You can download the latest version from the official website at [zen-browser.app](https://zen-browser.app/download), or from the [GitHub Releases](https://github.com/zen-browser/desktop/releases) page.
### Windows
#### Winget
- Generic
```
winget install --id Zen-Team.Zen-Browser
```
- Optimized
```
winget install --id Zen-Team.Zen-Browser.Optimized
```
####
### macOS ### macOS
- Requires macOS 10.15 or later - Requires macOS 10.15 or later

View File

@@ -28,14 +28,17 @@ function SignAndPackage($name) {
$files = Get-ChildItem engine\obj-x86_64-pc-windows-msvc\ -Recurse -Include *.exe $files = Get-ChildItem engine\obj-x86_64-pc-windows-msvc\ -Recurse -Include *.exe
$files += Get-ChildItem engine\obj-x86_64-pc-windows-msvc\ -Recurse -Include *.dll $files += Get-ChildItem engine\obj-x86_64-pc-windows-msvc\ -Recurse -Include *.dll
signtool.exe sign /n "$SignIdentity" /t http://time.certum.pl/ /fd sha1 /v $files signtool.exe sign /n "$SignIdentity" /t http://time.certum.pl/ /fd sha256 /v $files
echo "Packaging $name" echo "Packaging $name"
$env:SURFER_SIGNING_MODE="sign" $env:SURFER_SIGNING_MODE="sign"
$env:MAR="$PWD\\build\\winsign\\mar.exe" $env:MAR="$PWD\\build\\winsign\\mar.exe"
if ($name -eq "generic") { if ($name -eq "generic") {
$env:SURFER_COMPAT="true" $env:SURFER_COMPAT="true"
} else {
rm env:SURFER_COMPAT -ErrorAction SilentlyContinue
} }
echo "Compat Mode? $env:SURFER_COMPAT"
pnpm surfer package --verbose pnpm surfer package --verbose
# In the release script, we do the following: # In the release script, we do the following:
@@ -67,13 +70,22 @@ function SignAndPackage($name) {
# Move the zip # Move the zip
mv (Get-Item .\dist\*.en-US.win64.zip) windsign-temp\windows-x64-signed-$name\zen.win-$name.zip mv (Get-Item .\dist\*.en-US.win64.zip) windsign-temp\windows-x64-signed-$name\zen.win-$name.zip
# Extract the zip, sign everything inside, and repackage it
Expand-Archive -Path windsign-temp\windows-x64-signed-$name\zen.win-$name.zip -DestinationPath windsign-temp\windows-x64-signed-$name\zen.win-$name
rm windsign-temp\windows-x64-signed-$name\zen.win-$name.zip
$files = Get-ChildItem windsign-temp\windows-x64-signed-$name\zen.win-$name -Recurse -Include *.exe
$files += Get-ChildItem windsign-temp\windows-x64-signed-$name\zen.win-$name -Recurse -Include *.dll
signtool.exe sign /n "$SignIdentity" /t http://time.certum.pl/ /fd sha256 /v $files
Compress-Archive -Path windsign-temp\windows-x64-signed-$name\zen.win-$name -DestinationPath windsign-temp\windows-x64-signed-$name\zen.win-$name.zip
rmdir windsign-temp\windows-x64-signed-$name\zen.win-$name -Recurse -ErrorAction SilentlyContinue
# Move the manifest # Move the manifest
foreach ($file in Get-ChildItem .\dist\update\) { mv .\dist\update\. windsign-temp\windows-x64-signed-$name\update_manifest
mv ".\\dist\\update\\$file" windsign-temp\windows-x64-signed-$name\update_manifest
}
echo "Invoking tar for $name" echo "Invoking tar for $name"
tar -czvf .\.github\workflows\object\windows-x64-signed-$name.tar.gz -C .\windsign-temp\windows-x64-signed-$name . # note: We need to sign it into a parent folder, called windows-x64-signed-$name
rmdir .\.github\workflows\object\windows-x64-signed-$name -Recurse -ErrorAction SilentlyContinue
mv .\windsign-temp\windows-x64-signed-$name .\.github\workflows\object\windows-x64-signed-$name -Force
echo "Finished $name" echo "Finished $name"
} }

2
l10n

Submodule l10n updated: 39b011023d...49b3961b5f

View File

@@ -33,7 +33,7 @@
}, },
"homepage": "https://github.com/zen-browser/core#readme", "homepage": "https://github.com/zen-browser/core#readme",
"dependencies": { "dependencies": {
"@zen-browser/surfer": "^1.4.18" "@zen-browser/surfer": "^1.4.21"
}, },
"devDependencies": { "devDependencies": {
"husky": "^9.1.5", "husky": "^9.1.5",

10
pnpm-lock.yaml generated
View File

@@ -9,8 +9,8 @@ importers:
.: .:
dependencies: dependencies:
'@zen-browser/surfer': '@zen-browser/surfer':
specifier: ^1.4.18 specifier: ^1.4.21
version: 1.4.18 version: 1.4.21
devDependencies: devDependencies:
husky: husky:
specifier: ^9.1.5 specifier: ^9.1.5
@@ -119,8 +119,8 @@ packages:
'@types/node@17.0.45': '@types/node@17.0.45':
resolution: {integrity: sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==} resolution: {integrity: sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==}
'@zen-browser/surfer@1.4.18': '@zen-browser/surfer@1.4.21':
resolution: {integrity: sha512-NFqF5amqa4TuGFk+uVQNY4FngIvyhXvtZdpHUbU8Oeq3nfKE+bsLUHbFz8j9I5sFLQkuHmCsfTtR5gKA5el4YA==} resolution: {integrity: sha512-v05Mq6kjISGwWD7d6Bwl0zuH3JKu+xV5x/iJmMjgW3kReYwlKjexqkxQquKpn8bhwAbOBS/CtYBlRKi17Pqxpg==}
hasBin: true hasBin: true
ansi-escapes@7.0.0: ansi-escapes@7.0.0:
@@ -1003,7 +1003,7 @@ snapshots:
'@types/node@17.0.45': {} '@types/node@17.0.45': {}
'@zen-browser/surfer@1.4.18': '@zen-browser/surfer@1.4.21':
dependencies: dependencies:
'@resvg/resvg-js': 1.4.0 '@resvg/resvg-js': 1.4.0
async-icns: 1.0.2 async-icns: 1.0.2

View File

@@ -13,7 +13,7 @@
/**************************************************************************** /****************************************************************************
* Betterfox * * Betterfox *
* "Ad meliora" * * "Ad meliora" *
* version: 128 * * version: 130 *
* url: https://github.com/yokoffing/Betterfox * * url: https://github.com/yokoffing/Betterfox *
****************************************************************************/ ****************************************************************************/
@@ -21,7 +21,7 @@
* SECTION: FASTFOX * * SECTION: FASTFOX *
****************************************************************************/ ****************************************************************************/
/** GENERAL ***/ /** GENERAL ***/
pref("content.notify.interval", 100000); // (.10s); alt=500000 (.50s) //pref("content.notify.interval", 100000); // (.10s); alt=500000 (.50s)
/** GFX ***/ /** GFX ***/
pref("gfx.canvas.accelerated.cache-items", 32768); pref("gfx.canvas.accelerated.cache-items", 32768);
@@ -37,8 +37,6 @@ pref("media.cache_readahead_limit", 9000);
pref("media.cache_resume_threshold", 3600); pref("media.cache_resume_threshold", 3600);
pref("media.memory_caches_combined_limit_kb", 2560000); pref("media.memory_caches_combined_limit_kb", 2560000);
pref("browser.cache.memory.max_entry_size", 0);
/** IMAGE CACHE ***/ /** IMAGE CACHE ***/
pref("image.mem.decode_bytes_at_a_time", 32768); pref("image.mem.decode_bytes_at_a_time", 32768);

View File

@@ -52,7 +52,7 @@ pref('pdfjs.enableHighlightFloatingButton', true);
pref("alerts.showFavicons", true); pref("alerts.showFavicons", true);
pref("browser.tabs.loadBookmarksInTabs", true); pref("browser.tabs.loadBookmarksInTabs", false);
pref('browser.toolbars.bookmarks.visibility', 'never'); pref('browser.toolbars.bookmarks.visibility', 'never');
// Enable Do Not Track and GPC by default. // Enable Do Not Track and GPC by default.
@@ -73,20 +73,22 @@ pref('zen.welcomeScreen.seen', false);
pref('zen.tabs.vertical', true); pref('zen.tabs.vertical', true);
pref('zen.tabs.vertical.right-side', false); pref('zen.tabs.vertical.right-side', false);
pref('zen.theme.accent-color', "#aac7ff"); pref('zen.theme.accent-color', "#aac7ff");
pref('zen.theme.border-radius', 10); // In pixels pref('zen.theme.border-radius', 5); // In pixels
pref('zen.theme.content-element-separation', 4); // In pixels pref('zen.theme.content-element-separation', 6); // In pixels
pref('zen.theme.toolbar-themed', true); pref('zen.theme.toolbar-themed', true);
pref('zen.theme.pill-button', false); pref('zen.theme.pill-button', false);
pref('zen.view.compact', false); pref('zen.view.compact', false);
pref('zen.view.compact.hide-toolbar', false);
pref('zen.theme.color-prefs.amoled', false); pref('zen.theme.color-prefs.amoled', false);
pref('zen.theme.color-prefs.colorful', false); pref('zen.theme.color-prefs.colorful', false);
pref('zen.view.compact.hide-tabbar', true);
pref('zen.view.compact.hide-toolbar', false);
pref('zen.view.compact.toolbar-flash-popup', true); pref('zen.view.compact.toolbar-flash-popup', true);
pref('zen.view.compact.toolbar-flash-popup.duration', 800); pref('zen.view.compact.toolbar-flash-popup.duration', 800);
pref('zen.view.compact.toolbar-hide-after-hover.duration', 1000);
pref('zen.view.sidebar-height-throttle', 500); // in ms pref('zen.view.sidebar-height-throttle', 200); // in ms
pref('zen.view.sidebar-expanded', false); pref('zen.view.sidebar-expanded', false);
pref('zen.view.sidebar-expanded.on-hover', false); pref('zen.view.sidebar-expanded.on-hover', false);
pref('zen.view.sidebar-expanded.show-button', true); pref('zen.view.sidebar-expanded.show-button', true);
@@ -99,7 +101,6 @@ pref('zen.keyboard.shortcuts', ""); // Empty string means default shortcuts
pref('zen.keyboard.shortcuts.disable-firefox', false); pref('zen.keyboard.shortcuts.disable-firefox', false);
pref('zen.tabs.dim-pending', true); pref('zen.tabs.dim-pending', true);
pref('zen.themes.updated-value-observer', false); pref('zen.themes.updated-value-observer', false);
pref('zen.themes.tabs.legacy-location', false);
// Pref to enable the new profiles (TODO: Check this out!) // Pref to enable the new profiles (TODO: Check this out!)
//pref("browser.profiles.enabled", true); //pref("browser.profiles.enabled", true);
@@ -111,11 +112,13 @@ pref('zen.sidebar.close-on-blur', true);
// Zen Split View // Zen Split View
pref('zen.splitView.working', false); pref('zen.splitView.working', false);
pref('zen.splitView.min-resize-width', 7);
// Zen Workspaces // Zen Workspaces
pref('zen.workspaces.enabled', true); pref('zen.workspaces.enabled', true);
pref('zen.workspaces.hide-default-container-indicator', true); pref('zen.workspaces.hide-default-container-indicator', true);
pref('zen.workspaces.individual-pinned-tabs', true); pref('zen.workspaces.individual-pinned-tabs', true);
pref('zen.workspaces.show-icon-strip', true);
pref('zen.workspaces.icons', '["🌐", "📁", "📎", "📝", "📅", "📊"]'); pref('zen.workspaces.icons', '["🌐", "📁", "📎", "📝", "📅", "📊"]');
// Zen Watermark // Zen Watermark
@@ -145,6 +148,7 @@ pref('xpinstall.signatures.required', false);
// Experimental Zen Features // Experimental Zen Features
// Strategy to use for bytecode cache (Thanks https://github.com/gunir) // Strategy to use for bytecode cache (Thanks https://github.com/gunir)
pref('dom.script_loader.bytecode_cache.strategy', 2); pref('dom.script_loader.bytecode_cache.strategy', 2);
pref("dom.text_fragments.enabled", true);
// Enable private suggestions // Enable private suggestions
pref('browser.search.suggest.enabled', true); pref('browser.search.suggest.enabled', true);
@@ -195,6 +199,9 @@ pref("widget.non-native-theme.use-theme-accent", true);
pref("privacy.resistFingerprinting.letterboxing", false); pref("privacy.resistFingerprinting.letterboxing", false);
pref("privacy.resistFingerprinting.letterboxing.dimensions", ""); pref("privacy.resistFingerprinting.letterboxing.dimensions", "");
// Remove Inspect Accessibity Properties menu
pref("devtools.accessibility.enabled", false);
// Enable GPU by default // Enable GPU by default
pref('gfx.webrender.all', true); pref('gfx.webrender.all', true);
pref('layers.acceleration.force-enabled', true); pref('layers.acceleration.force-enabled', true);

View File

@@ -0,0 +1,127 @@
export var ZenCustomizableUI = new class {
constructor() {}
TYPE_TOOLBAR = 'toolbar';
defaultSidebarIcons = [
'zen-sidepanel-button',
'zen-workspaces-button',
'new-tab-button'
];
startup(CustomizableUIInternal) {
CustomizableUIInternal.registerArea(
"zen-sidebar-top-buttons",
{
type: this.TYPE_TOOLBAR,
defaultPlacements: [
"PanelUI-menu-button", "zen-expand-sidebar-button", "zen-profile-button"
],
defaultCollapsed: null,
}
);
CustomizableUIInternal.registerArea(
"zen-sidebar-icons-wrapper",
{
type: this.TYPE_TOOLBAR,
defaultPlacements: this.defaultSidebarIcons,
defaultCollapsed: null,
}
);
}
// We do not have access to the window object here
init(window) {
this._addSidebarButtons(window);
this._hideToolbarButtons(window);
}
_addSidebarButtons(window) {
const sidebarBox = window.MozXULElement.parseXULToFragment(`
<toolbar id="zen-sidebar-top-buttons"
fullscreentoolbar="true"
class="browser-toolbar customization-target zen-dont-hide-on-fullscreen"
brighttext="true"
data-l10n-id="tabs-toolbar"
customizable="true"
toolbarname="Zen Sidebar Top Buttons"
context="toolbar-context-menu"
flex="1"
customizationtarget="zen-sidebar-top-buttons-customization-target"
mode="icons">
<hbox id="zen-sidebar-top-buttons-customization-target" class="customization-target" flex="1">
<toolbarbutton removable="true" class="chromeclass-toolbar-additional toolbarbutton-1 zen-sidebar-action-button" id="zen-expand-sidebar-button" data-l10n-id="sidebar-zen-expand" cui-areatype="toolbar" oncommand="gZenVerticalTabsManager.toggleExpand();"></toolbarbutton>
<toolbarbutton id="zen-profile-button"
class="zen-sidebar-action-button toolbarbutton-1 chromeclass-toolbar-additional"
delegatesanchor="true"
onmousedown="ZenProfileDialogUI.showSubView(this, event)"
onkeypress="ZenProfileDialogUI.showSubView(this, event)"
consumeanchor="zen-profile-button"
closemenu="none"
data-l10n-id="toolbar-button-account"
cui-areatype="toolbar"
badged="true"
removable="true">
<vbox>
<image id="zen-profile-button-icon" />
</vbox>
</toolbarbutton>
</hbox>
</toolbar>
`);
window.document.getElementById('navigator-toolbox').prepend(sidebarBox);
const sideBarTopButtons = window.document.getElementById('zen-sidebar-top-buttons')
.querySelector('#zen-sidebar-top-buttons-customization-target');
const newTab = window.document.getElementById('vertical-tabs-newtab-button');
newTab.classList.add('zen-sidebar-action-button');
window.CustomizableUI.registerToolbarNode(
window.document.getElementById('zen-sidebar-top-buttons')
);
const panelMenu = window.document.getElementById('PanelUI-menu-button');
panelMenu.classList.add('zen-sidebar-action-button');
panelMenu.setAttribute('cui-areatype', 'toolbar');
sideBarTopButtons.prepend(panelMenu);
for (let id of this.defaultSidebarIcons) {
const elem = window.document.getElementById(id);
if (id === 'zen-workspaces-button' || !elem) continue;
elem.setAttribute('removable', 'true');
}
window.CustomizableUI.registerToolbarNode(
window.document.getElementById('zen-sidebar-icons-wrapper')
);
this._moveWindowButtons(window);
}
_moveWindowButtons(window) {
const windowControls = window.document.getElementsByClassName('titlebar-buttonbox-container');
const toolboxIcons = window.document.getElementById('zen-sidebar-top-buttons-customization-target');
if (window.AppConstants.platform === "macosx") {
for (let i = 0; i < windowControls.length; i++) {
if (i === 0) {
toolboxIcons.prepend(windowControls[i]);
continue;
}
windowControls[i].remove();
}
}
}
_hideToolbarButtons(window) {
const elementsToHide = [
'alltabs-button',
];
for (let id of elementsToHide) {
const elem = window.document.getElementById(id);
if (elem) {
elem.setAttribute('hidden', 'true');
}
}
}
};

View File

@@ -9,6 +9,7 @@
); );
var ZenStartup = { var ZenStartup = {
init() { init() {
this.logHeader();
this.openWatermark(); this.openWatermark();
window.SessionStore.promiseInitialized.then(async () => { window.SessionStore.promiseInitialized.then(async () => {
this._changeSidebarLocation(); this._changeSidebarLocation();
@@ -40,6 +41,8 @@
// Disable smooth scroll // Disable smooth scroll
gBrowser.tabContainer.arrowScrollbox.smoothScroll = false; gBrowser.tabContainer.arrowScrollbox.smoothScroll = false;
ZenWorkspaces.init();
gZenUIManager.init();
gZenVerticalTabsManager.init(); gZenVerticalTabsManager.init();
gZenCompactModeManager.init(); gZenCompactModeManager.init();
gZenKeyboardShortcuts.init(); gZenKeyboardShortcuts.init();
@@ -66,7 +69,7 @@
tabs.style.maxHeight = '0px'; // reset to 0 tabs.style.maxHeight = '0px'; // reset to 0
const toolbarRect = toolbarItems.getBoundingClientRect(); const toolbarRect = toolbarItems.getBoundingClientRect();
// -5 for the controls padding // -5 for the controls padding
let totalHeight = toolbarRect.height - 15; let totalHeight = toolbarRect.height - 5;
// remove the height from other elements that aren't hidden // remove the height from other elements that aren't hidden
const otherElements = document.querySelectorAll('#tabbrowser-tabs > *:not([hidden="true"])'); const otherElements = document.querySelectorAll('#tabbrowser-tabs > *:not([hidden="true"])');
for (let tab of otherElements) { for (let tab of otherElements) {
@@ -75,14 +78,6 @@
} }
tabs.style.maxHeight = totalHeight + 'px'; tabs.style.maxHeight = totalHeight + 'px';
//console.info('ZenThemeModifier: set tabs max-height to', totalHeight + 'px'); //console.info('ZenThemeModifier: set tabs max-height to', totalHeight + 'px');
const allTabs = document.getElementById('alltabs-button');
allTabs.removeAttribute('hidden');
allTabs.removeAttribute('badged');
allTabs.setAttribute('class', 'toolbarbutton-1 zen-sidebar-action-button');
document.getElementById('zen-sidebar-icons-wrapper').prepend(
allTabs
);
}, },
openWatermark() { openWatermark() {
@@ -105,12 +100,7 @@
}, },
_changeSidebarLocation() { _changeSidebarLocation() {
const legacyLocation = Services.prefs.getBoolPref('zen.themes.tabs.legacy-location', false);
const kElementsToAppend = ['sidebar-splitter', 'sidebar-box']; const kElementsToAppend = ['sidebar-splitter', 'sidebar-box'];
if (legacyLocation) {
kElementsToAppend.push('navigator-toolbox');
window.document.documentElement.setAttribute('zen-sidebar-legacy', 'true');
}
const wrapper = document.getElementById('zen-tabbox-wrapper'); const wrapper = document.getElementById('zen-tabbox-wrapper');
const appWrapepr = document.getElementById('zen-sidebar-box-container'); const appWrapepr = document.getElementById('zen-sidebar-box-container');
for (let id of kElementsToAppend) { for (let id of kElementsToAppend) {
@@ -123,9 +113,7 @@
const browser = document.getElementById('browser'); const browser = document.getElementById('browser');
const toolbox = document.getElementById('navigator-toolbox'); const toolbox = document.getElementById('navigator-toolbox');
if (!legacyLocation) {
browser.prepend(toolbox); browser.prepend(toolbox);
}
// remove all styles except for the width, since we are xulstoring the complet style list // remove all styles except for the width, since we are xulstoring the complet style list
const width = toolbox.style.width; const width = toolbox.style.width;
@@ -144,6 +132,21 @@
_focusSearchBar() { _focusSearchBar() {
gURLBar.focus(); gURLBar.focus();
}, },
logHeader() {
console.info(`
Welcome to Zen Browser!
If you are seeing this message, it means that you have successfully opened Zen's developer console.
Here you can see all the logs and errors that Zen is generating.
If you have any questions or need help, please contact us in any media in https://zen-browser.app/
Note: This developer console is not the same as the browser console, it has access to Zen's internal functions and variables, including your passwords and other sensitive information. Please do not paste any code here unless you know what you are doing.
`);
}
}; };
ZenStartup.init(); ZenStartup.init();

View File

@@ -1,4 +1,12 @@
var gZenUIManager = { var gZenUIManager = {
_popupTrackingElements: [],
init () {
document.addEventListener('popupshowing', this.onPopupShowing.bind(this));
document.addEventListener('popuphidden', this.onPopupHidden.bind(this));
},
openAndChangeToTab(url, options) { openAndChangeToTab(url, options) {
if (window.ownerGlobal.parent) { if (window.ownerGlobal.parent) {
let tab = window.ownerGlobal.parent.gBrowser.addTrustedTab(url, options); let tab = window.ownerGlobal.parent.gBrowser.addTrustedTab(url, options);
@@ -24,6 +32,46 @@ var gZenUIManager = {
createValidXULText(text) { createValidXULText(text) {
return text.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;'); return text.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
}, },
/**
* Adds the 'has-popup-menu' attribute to the element when popup is opened on it.
* @param element element to track
*/
addPopupTrackingAttribute(element) {
this._popupTrackingElements.push(element);
},
removePopupTrackingAttribute(element) {
this._popupTrackingElements.remove(element);
},
onPopupShowing(showEvent) {
for (const el of this._popupTrackingElements) {
if (!el.contains(event.explicitOriginalTarget)) {
continue;
}
document.removeEventListener('mousemove', this.__removeHasPopupAttribute);
el.setAttribute('has-popup-menu', '');
this.__currentPopup = showEvent.target;
this.__currentPopupTrackElement = el;
break;
}
},
onPopupHidden(hideEvent) {
if (!this.__currentPopup || this.__currentPopup !== hideEvent.target) {
return;
}
const element = this.__currentPopupTrackElement;
if (document.getElementById('main-window').matches(':hover')) {
element.removeAttribute('has-popup-menu');
} else {
this.__removeHasPopupAttribute = () => element.removeAttribute('has-popup-menu');
document.addEventListener('mousemove', this.__removeHasPopupAttribute, {once: true});
}
this.__currentPopup = null;
this.__currentPopupTrackElement = null;
},
}; };
var gZenVerticalTabsManager = { var gZenVerticalTabsManager = {
@@ -33,6 +81,7 @@ var gZenVerticalTabsManager = {
Services.prefs.addObserver('zen.tabs.vertical.right-side', updateEvent); Services.prefs.addObserver('zen.tabs.vertical.right-side', updateEvent);
Services.prefs.addObserver('zen.view.sidebar-expanded.max-width', updateEvent); Services.prefs.addObserver('zen.view.sidebar-expanded.max-width', updateEvent);
Services.prefs.addObserver('zen.view.sidebar-expanded.on-hover', updateEvent); Services.prefs.addObserver('zen.view.sidebar-expanded.on-hover', updateEvent);
gZenCompactModeManager.addEventListener(updateEvent);
this._updateEvent(); this._updateEvent();
this.initRightSideOrderContextMenu(); this.initRightSideOrderContextMenu();
}, },
@@ -72,16 +121,33 @@ var gZenVerticalTabsManager = {
_updateEvent() { _updateEvent() {
this._updateMaxWidth(); this._updateMaxWidth();
if (Services.prefs.getBoolPref('zen.view.sidebar-expanded')) { const topButtons = document.getElementById('zen-sidebar-top-buttons');
this.navigatorToolbox.setAttribute('zen-expanded', 'true'); const customizationTarget = document.getElementById('nav-bar-customization-target');
} else { const tabboxWrapper = document.getElementById('zen-tabbox-wrapper');
this.navigatorToolbox.removeAttribute('zen-expanded'); const browser = document.getElementById('browser');
}
if (Services.prefs.getBoolPref('zen.tabs.vertical.right-side')) { if (Services.prefs.getBoolPref('zen.tabs.vertical.right-side')) {
this.navigatorToolbox.setAttribute('zen-right-side', 'true'); this.navigatorToolbox.setAttribute('zen-right-side', 'true');
} else { } else {
this.navigatorToolbox.removeAttribute('zen-right-side'); this.navigatorToolbox.removeAttribute('zen-right-side');
} }
if (Services.prefs.getBoolPref('zen.view.sidebar-expanded')) {
this.navigatorToolbox.setAttribute('zen-expanded', 'true');
} else {
this.navigatorToolbox.removeAttribute('zen-expanded');
}
if (this.navigatorToolbox.hasAttribute('zen-expanded') && !this.navigatorToolbox.hasAttribute('zen-right-side')
&& !Services.prefs.getBoolPref('zen.view.compact') && !Services.prefs.getBoolPref('zen.view.sidebar-expanded.on-hover')) {
this.navigatorToolbox.prepend(topButtons);
browser.prepend(this.navigatorToolbox);
} else {
customizationTarget.prepend(topButtons);
tabboxWrapper.prepend(this.navigatorToolbox);
}
// Always move the splitter next to the sidebar
this.navigatorToolbox.after(document.getElementById('zen-sidebar-splitter'));
this._updateOnHoverVerticalTabs(); this._updateOnHoverVerticalTabs();
}, },
@@ -126,68 +192,3 @@ var gZenVerticalTabsManager = {
Services.prefs.setBoolPref('zen.view.sidebar-expanded.on-hover', false); Services.prefs.setBoolPref('zen.view.sidebar-expanded.on-hover', false);
}, },
}; };
var gZenCompactModeManager = {
_flashSidebarTimeout: null,
init() {
Services.prefs.addObserver('zen.view.compact', this._updateEvent.bind(this));
Services.prefs.addObserver('zen.view.compact.toolbar-flash-popup.duration', this._updatedSidebarFlashDuration.bind(this));
},
get prefefence() {
return Services.prefs.getBoolPref('zen.view.compact');
},
set preference(value) {
Services.prefs.setBoolPref('zen.view.compact', value);
},
_updateEvent() {
Services.prefs.setBoolPref('zen.view.sidebar-expanded.on-hover', false);
},
toggle() {
this.preference = !this.prefefence;
},
_updatedSidebarFlashDuration() {
this._flashSidebarDuration = Services.prefs.getIntPref('zen.view.compact.toolbar-flash-popup.duration');
},
toggleSidebar() {
let sidebar = document.getElementById('navigator-toolbox');
sidebar.toggleAttribute('zen-user-show');
},
get flashSidebarDuration() {
if (this._flashSidebarDuration) {
return this._flashSidebarDuration;
}
return Services.prefs.getIntPref('zen.view.compact.toolbar-flash-popup.duration');
},
flashSidebar() {
let sidebar = document.getElementById('navigator-toolbox');
let tabPanels = document.getElementById('tabbrowser-tabpanels');
if (sidebar.matches(':hover') || tabPanels.matches("[zen-split-view='true']")) {
return;
}
if (this._flashSidebarTimeout) {
clearTimeout(this._flashSidebarTimeout);
} else {
window.requestAnimationFrame(() => sidebar.setAttribute('flash-popup', ''));
}
this._flashSidebarTimeout = setTimeout(() => {
window.requestAnimationFrame(() => {
sidebar.removeAttribute('flash-popup');
this._flashSidebarTimeout = null;
});
}, this.flashSidebarDuration);
},
toggleToolbar() {
let toolbar = document.getElementById('zen-appcontent-navbar-container');
toolbar.toggleAttribute('zen-user-show');
},
};

View File

@@ -1,8 +1,16 @@
diff --git a/browser/base/content/browser-init.js b/browser/base/content/browser-init.js diff --git a/browser/base/content/browser-init.js b/browser/base/content/browser-init.js
index f8d49ac2a3a62f389ea44b07a26fcb102abc0b24..c29415e10c776ebc435f33e55f8afb71f0dcf22a 100644 index bee5309c04775adff8652bfe6c54b2d466e821ac..e9741628dcc9eda3500f69441bae293548179e71 100644
--- a/browser/base/content/browser-init.js --- a/browser/base/content/browser-init.js
+++ b/browser/base/content/browser-init.js +++ b/browser/base/content/browser-init.js
@@ -237,6 +237,10 @@ var gBrowserInit = { @@ -143,6 +143,7 @@ var gBrowserInit = {
gNavToolbox.palette = document.getElementById(
"BrowserToolbarPalette"
).content;
+ ZenCustomizableUI.init(window);
for (let area of CustomizableUI.areas) {
let type = CustomizableUI.getAreaType(area);
if (type == CustomizableUI.TYPE_TOOLBAR) {
@@ -239,6 +240,10 @@ var gBrowserInit = {
gPrivateBrowsingUI.init(); gPrivateBrowsingUI.init();
BrowserSearch.init(); BrowserSearch.init();
BrowserPageActions.init(); BrowserPageActions.init();

View File

@@ -1,8 +1,16 @@
diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js
index b18f371a47fec53882c3dfb68e34d1a474eaf446..2c183d7e7fc65e00403f5e40e7859b915a3ea700 100644 index a29d7a84e84651ea0bdc9be8e4ac650bde2e048a..e1d1cf3bb925b8efb1411d1dc77a56f086858b5a 100644
--- a/browser/base/content/browser.js --- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js +++ b/browser/base/content/browser.js
@@ -630,6 +630,15 @@ XPCOMUtils.defineLazyPreferenceGetter( @@ -32,6 +32,7 @@ ChromeUtils.defineESModuleGetters(this, {
ContextualIdentityService:
"resource://gre/modules/ContextualIdentityService.sys.mjs",
CustomizableUI: "resource:///modules/CustomizableUI.sys.mjs",
+ ZenCustomizableUI: "chrome://browser/content/ZenCustomizableUI.sys.mjs",
DevToolsSocketStatus:
"resource://devtools/shared/security/DevToolsSocketStatus.sys.mjs",
DownloadUtils: "resource://gre/modules/DownloadUtils.sys.mjs",
@@ -629,6 +630,15 @@ XPCOMUtils.defineLazyPreferenceGetter(
false false
); );
@@ -18,7 +26,7 @@ index b18f371a47fec53882c3dfb68e34d1a474eaf446..2c183d7e7fc65e00403f5e40e7859b91
customElements.setElementCreationCallback("screenshots-buttons", () => { customElements.setElementCreationCallback("screenshots-buttons", () => {
Services.scriptloader.loadSubScript( Services.scriptloader.loadSubScript(
"chrome://browser/content/screenshots/screenshots-buttons.js", "chrome://browser/content/screenshots/screenshots-buttons.js",
@@ -3679,6 +3688,9 @@ var XULBrowserWindow = { @@ -3435,6 +3445,9 @@ var XULBrowserWindow = {
AboutReaderParent.updateReaderButton(gBrowser.selectedBrowser); AboutReaderParent.updateReaderButton(gBrowser.selectedBrowser);
TranslationsParent.onLocationChange(gBrowser.selectedBrowser); TranslationsParent.onLocationChange(gBrowser.selectedBrowser);
@@ -28,7 +36,7 @@ index b18f371a47fec53882c3dfb68e34d1a474eaf446..2c183d7e7fc65e00403f5e40e7859b91
PictureInPicture.updateUrlbarToggle(gBrowser.selectedBrowser); PictureInPicture.updateUrlbarToggle(gBrowser.selectedBrowser);
if (!gMultiProcessBrowser) { if (!gMultiProcessBrowser) {
@@ -5001,7 +5013,7 @@ function setToolbarVisibility( @@ -4769,7 +4782,7 @@ function setToolbarVisibility(
); );
} }
@@ -37,7 +45,7 @@ index b18f371a47fec53882c3dfb68e34d1a474eaf446..2c183d7e7fc65e00403f5e40e7859b91
switch (isVisible) { switch (isVisible) {
case true: case true:
case "always": case "always":
@@ -7832,6 +7844,12 @@ var gDialogBox = { @@ -7609,6 +7622,12 @@ var gDialogBox = {
parentElement.showModal(); parentElement.showModal();
this._didOpenHTMLDialog = true; this._didOpenHTMLDialog = true;

View File

@@ -26,7 +26,9 @@
<script type="text/javascript"> <script type="text/javascript">
window.addEventListener("DOMContentLoaded", async () => { window.addEventListener("DOMContentLoaded", async () => {
// Theme importer always needs to be loaded first // Theme importer always needs to be loaded first
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenThemesCommon.mjs");
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenThemesImporter.mjs"); Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenThemesImporter.mjs");
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenCompactMode.mjs");
Services.scriptloader.loadSubScript("chrome://browser/content/ZenUIManager.mjs"); Services.scriptloader.loadSubScript("chrome://browser/content/ZenUIManager.mjs");
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenSidebarManager.mjs"); Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenSidebarManager.mjs");
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenWorkspaces.mjs"); Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenWorkspaces.mjs");

View File

@@ -3,7 +3,10 @@
content/browser/zenThemeModifier.js (content/zenThemeModifier.js) content/browser/zenThemeModifier.js (content/zenThemeModifier.js)
content/browser/ZenStartup.mjs (content/ZenStartup.mjs) content/browser/ZenStartup.mjs (content/ZenStartup.mjs)
content/browser/ZenUIManager.mjs (content/ZenUIManager.mjs) content/browser/ZenUIManager.mjs (content/ZenUIManager.mjs)
content/browser/ZenCustomizableUI.sys.mjs (content/ZenCustomizableUI.sys.mjs)
content/browser/zen-components/ZenCompactMode.mjs (content/zen-components/src/ZenCompactMode.mjs)
content/browser/zen-components/ZenViewSplitter.mjs (content/zen-components/src/ZenViewSplitter.mjs) content/browser/zen-components/ZenViewSplitter.mjs (content/zen-components/src/ZenViewSplitter.mjs)
content/browser/zen-components/ZenThemesCommon.mjs (content/zen-components/src/ZenThemesCommon.mjs)
content/browser/zen-components/ZenWorkspaces.mjs (content/zen-components/src/ZenWorkspaces.mjs) content/browser/zen-components/ZenWorkspaces.mjs (content/zen-components/src/ZenWorkspaces.mjs)
content/browser/zen-components/ZenSidebarManager.mjs (content/zen-components/src/ZenSidebarManager.mjs) content/browser/zen-components/ZenSidebarManager.mjs (content/zen-components/src/ZenSidebarManager.mjs)
content/browser/zen-components/ZenProfileDialogUI.mjs (content/zen-components/src/ZenProfileDialogUI.mjs) content/browser/zen-components/ZenProfileDialogUI.mjs (content/zen-components/src/ZenProfileDialogUI.mjs)

View File

@@ -1,9 +1,11 @@
<toolbar brighttext="true" id="zen-sidebar-icons-wrapper" class="zen-dont-hide-on-fullscreen"> <toolbar brighttext="true"
<toolbarbutton class="toolbarbutton-1 zen-sidebar-action-button chromeclass-toolbar-additional subviewbutton-nav" badge="true" closemenu="none" removable="true" delegatesanchor="true" cui-areatype="toolbar" id="zen-profile-button" data-l10n-id="toolbar-button-account" onclick="ZenProfileDialogUI.showSubView(this, event)"> id="zen-sidebar-icons-wrapper"
</toolbarbutton> fullscreentoolbar="true"
<toolbarbutton class="toolbarbutton-1 zen-sidebar-action-button" id="zen-expand-sidebar-button" data-l10n-id="sidebar-zen-expand" oncommand="gZenVerticalTabsManager.toggleExpand();"></toolbarbutton> class="browser-toolbar customization-target zen-dont-hide-on-fullscreen"
<toolbarbutton class="toolbarbutton-1 zen-sidebar-action-button" id="zen-sidepanel-button" data-l10n-id="sidebar-zen-sidepanel" onclick="gZenBrowserManagerSidebar.toggle();"></toolbarbutton> data-l10n-id="tabs-toolbar"
<toolbarbutton class="toolbarbutton-1 zen-sidebar-action-button" id="zen-bookmark-button" data-l10n-id="sidebar-menu-bookmarks" onclick="gZenUIManager.toogleBookmarksSidebar();"></toolbarbutton> customizable="true"
<toolbarbutton class="toolbarbutton-1 zen-sidebar-action-button" id="zen-history-button" data-l10n-id="sidebar-menu-history" oncommand="PanelUI.showSubView('PanelUI-history', this);"></toolbarbutton> toolbarname="Zen Sidebar Icons"
<toolbarbutton class="toolbarbutton-1 zen-sidebar-action-button" id="zen-preferences-button" data-l10n-id="toolbar-settings-button" onclick="event.target.ownerGlobal.openPreferences(undefined);"></toolbarbutton> context="toolbar-context-menu"
mode="icons">
<toolbarbutton removeable="true" class="toolbarbutton-1 zen-sidebar-action-button" id="zen-sidepanel-button" data-l10n-id="sidebar-zen-sidepanel" onclick="gZenBrowserManagerSidebar.toggle();"></toolbarbutton>
</toolbar> </toolbar>

View File

@@ -1,4 +1,4 @@
<box id="zen-sidebar-web-panel-wrapper"> <hbox id="zen-sidebar-web-panel-wrapper">
<box id="zen-sidebar-web-panel" class="chromeclass-extrachrome" hidden="true" persist="pinned style hidden"> <box id="zen-sidebar-web-panel" class="chromeclass-extrachrome" hidden="true" persist="pinned style hidden">
<toolbar mode="icons" flex="1" id="zen-sidebar-web-header"> <toolbar mode="icons" flex="1" id="zen-sidebar-web-header">
<hbox> <hbox>
@@ -29,4 +29,4 @@
<html:span id="zen-sidebar-web-panel-splitter"></html:span> <html:span id="zen-sidebar-web-panel-splitter"></html:span>
<html:span id="zen-sidebar-web-panel-hsplitter"></html:span> <html:span id="zen-sidebar-web-panel-hsplitter"></html:span>
</box> </box>
</box> </hbox>

View File

@@ -35,7 +35,7 @@
@keyframes zen-slide-in { @keyframes zen-slide-in {
from { from {
transform: translateX(-10px); transform: translateX(-30px);
opacity: 0; opacity: 0;
} }
to { to {
@@ -94,7 +94,7 @@
@keyframes zen-vtabs-animation { @keyframes zen-vtabs-animation {
0% { 0% {
opacity: 0; opacity: 0;
transform: translateX(-5px); transform: translateX(-10px);
} }
20% { 20% {
@@ -109,7 +109,7 @@
@keyframes zen-sidebar-panel-animation-right { @keyframes zen-sidebar-panel-animation-right {
0% { 0% {
opacity: 0; opacity: 0;
transform: translateX(5px); transform: translateX(10px);
} }
20% { 20% {
@@ -136,3 +136,33 @@
display: none !important; display: none !important;
} }
} }
@keyframes zen-workspaces-button-active {
from {
bottom: -20px;
}
to {
bottom: -2px;
}
}
@keyframes zen-workspaces-button-active-collapsed-left {
from {
left: -20px;
}
to {
left: -2px;
}
}
@keyframes zen-workspaces-button-active-collapsed-right {
from {
right: -20px;
}
to {
right: -2px;
}
}

View File

@@ -5,19 +5,12 @@
transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0);
position: relative; position: relative;
/* This fixes an issue with the left border */ overflow: hidden;
--zen-webview-correction-margin: 2px;
margin-left: var(--zen-webview-correction-margin);
#browser:has(#navigator-toolbox[zen-right-side="true"]) & {
margin-left: 0;
margin-right: var(--zen-webview-correction-margin);
}
--uc-tweak-rounded-corners-shadow-color: var(--zen-colors-border); --uc-tweak-rounded-corners-shadow-color: var(--zen-colors-border);
--uc-tweak-rounded-corners-shadow: --uc-tweak-rounded-corners-shadow:
0 0 1px 1px var(--uc-tweak-rounded-corners-shadow-color); 0 0 0 1px var(--uc-tweak-rounded-corners-shadow-color);
box-shadow: var(--uc-tweak-rounded-corners-shadow) !important; box-shadow: var(--uc-tweak-rounded-corners-shadow) !important;
@@ -32,7 +25,7 @@
* same shadow from the browser window on top. */ * same shadow from the browser window on top. */
box-shadow: box-shadow:
var(--uc-tweak-rounded-corners-shadow, 0 0 transparent), var(--uc-tweak-rounded-corners-shadow, 0 0 transparent),
0 0 0 16px var(--zen-themed-toolbar-bg) !important; 0 0 0 16px var(--zen-main-browser-background) !important;
clip-path: inset(0); clip-path: inset(0);
pointer-events: none; pointer-events: none;
} }

View File

@@ -33,11 +33,11 @@
width: 100%; width: 100%;
} }
:not([inDOMFullscreen='true']) #appcontent { :root:not([inDOMFullscreen='true']) #appcontent {
overflow: hidden; overflow: hidden;
} }
:not([inDOMFullscreen='true']) #appcontent, :root:not([inDOMFullscreen='true']) #appcontent,
#sidebar-box { #sidebar-box {
/** Sidebar is already hidden in full screen mode */ /** Sidebar is already hidden in full screen mode */
border: none; border: none;
@@ -51,3 +51,7 @@
display: flex; display: flex;
flex-direction: row; flex-direction: row;
} }
:root:not([inDOMFullscreen='true']) #tabbrowser-tabbox {
padding: 1px; /* To allow the web view's shadow to be visible */
}

View File

@@ -7,214 +7,120 @@
} }
@media (-moz-bool-pref: 'zen.view.compact') { @media (-moz-bool-pref: 'zen.view.compact') {
:root[sizemode='fullscreen'], :root:not([customizing]) {
#navigator-toolbox[inFullscreen] { @media (-moz-bool-pref: 'zen.view.compact.hide-tabbar') {
margin-top: 0 !important; #zen-sidebar-web-panel-wrapper:has(#zen-sidebar-web-panel[pinned='true']) {
margin-left: calc(var(--zen-sidebar-web-panel-spacing) * 2) !important;
} }
#nav-bar { #zen-sidebar-top-buttons-customization-target {
padding-left: 5px !important; padding-inline-start: calc(var(--zen-toolbox-padding) - var(--toolbarbutton-outer-padding)) !important;
} }
#navigator-toolbox { /* Set the extra paddings */
--zen-compact-toolbox-margin-single: calc(var(--zen-element-separation) * 2); #tabbrowser-tabpanels {
--zen-compact-toolbox-margin: var(--zen-compact-toolbox-margin-single); :root:not([inDOMFullscreen='true']) #browser:has(#navigator-toolbox[zen-right-side='true']) & {
position: absolute; padding-right: var(--zen-element-separation) !important;
display: block;
transition: 200ms ease-in-out !important;
transform: translateX(calc(-100% + (var(--zen-compact-toolbox-margin-single) / 2)));
opacity: 0;
line-height: 0;
z-index: 2;
height: 100%;
margin: 0;
padding: var(--zen-compact-toolbox-margin) !important;
& #titlebar {
border: 1px solid var(--zen-colors-border);
transition-delay: 200ms;
background: var(--zen-colors-tertiary) !important;
padding: var(--zen-toolbox-padding);
border-radius: var(--zen-panel-radius);
} }
& > * { :root:not([inDOMFullscreen='true']) #browser:has(#navigator-toolbox:not([zen-right-side='true'])) & {
pointer-events: none; padding-left: var(--zen-element-separation) !important;
} }
&,
& #titlebar {
min-width: var(--zen-toolbox-min-width) !important;
}
}
@media not (-moz-bool-pref: 'zen.view.sidebar-expanded') {
#navigator-toolbox {
width: fit-content !important;
--zen-toolbox-max-width: calc(50px + var(--zen-compact-toolbox-margin-single) * 2) !important;
}
}
@media (-moz-bool-pref: 'zen.view.sidebar-expanded') {
#navigator-toolbox {
min-width: calc(var(--zen-navigation-toolbar-min-width) + var(--zen-compact-toolbox-margin-single) * 2) !important;
}
}
#zen-sidebar-web-panel-wrapper:not(:has(#zen-sidebar-web-panel[hidden='true'])),
#sidebar-box:not([positionend='true']) {
margin-right: 0 !important;
margin-left: var(--zen-sidebar-web-panel-spacing) !important;
}
#sidebar-box[positionend='true'] {
margin-left: 0 !important;
margin-right: var(--zen-sidebar-web-panel-spacing) !important;
}
#sidebar-splitter {
margin: 0 !important;
}
@media not (-moz-bool-pref: 'zen.view.compact.hide-toolbar') {
#navigator-toolbox {
/* Remove the top margin */
/* The toolbox isn't relative to the webview anymore, meaning we can't just add a static value and call it a day...
* The top margin is calculated by taking the following factors into account:
* 1. Element separation
* 2. Extra margin to separate from the webview
* 3. Add element separation variable, to avoid overlaping with the toolbar
* 4. Calculate toolbar height, taken from zen-urlbar.css
*/
--zen-compact-toolbox-margin: calc(
var(--zen-compact-toolbox-margin-single) + 0.15rem + var(--zen-element-separation) +
(18px + (var(--toolbarbutton-inner-padding) * 2))
)
var(--zen-compact-toolbox-margin-single) var(--zen-compact-toolbox-margin-single)
var(--zen-compact-toolbox-margin-single);
:root[zen-sidebar-legacy='true'] & {
--zen-compact-toolbox-margin: calc(var(--zen-compact-toolbox-margin-single) / 2)
var(--zen-compact-toolbox-margin-single) var(--zen-compact-toolbox-margin-single)
var(--zen-compact-toolbox-margin-single);
}
}
#zen-sidebar-web-panel-wrapper,
#sidebar-box {
margin-top: 0 !important;
}
}
#navigator-toolbox:hover,
#navigator-toolbox:focus-within,
#navigator-toolbox[zen-user-show],
#navigator-toolbox[flash-popup],
#navigator-toolbox[movingtab],
#mainPopupSet:has(> #appMenu-popup:hover) ~ toolbox,
#navigator-toolbox:has(.tabbrowser-tab:active),
#navigator-toolbox:has(*[open='true']:not(tab):not(#zen-sidepanel-button)) {
transform: none !important;
opacity: 1;
& > * {
pointer-events: all;
}
}
#navigator-toolbox > * {
line-height: normal;
}
#navigator-toolbox,
#navigator-toolbox > * {
-moz-appearance: none !important;
} }
#zen-sidebar-splitter { #zen-sidebar-splitter {
display: none !important; display: none !important;
} }
/* Don't apply transform before window has been fully created */ #navigator-toolbox {
:root:not([sessionrestored]) #navigator-toolbox { position: absolute;
transform: none !important; height: 98%;
z-index: 9;
background: var(--zen-themed-toolbar-bg) !important;
box-shadow: 0 0 2px 2px rgba(0,0,0,.1);
border-top-right-radius: var(--zen-border-radius);
border-bottom-right-radius: var(--zen-border-radius);
border: 1px solid var(--zen-colors-border);
border-left-width: 0;
padding: var(--zen-toolbox-padding) !important;
transition: all 0.2s ease-in-out;
right: calc(100% - var(--zen-element-separation) + 1px);
top: 50%;
opacity: 0;
transform: translate3d(0, -50%, 0);
#browser:has(#navigator-toolbox[zen-right-side='true']) & {
border-left-width: 1px;
border-right-width: 0;
left: calc(100% - var(--zen-element-separation) - 1px);
right: unset;
border-top-left-radius: var(--zen-border-radius);
border-bottom-left-radius: var(--zen-border-radius);
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
} }
:root[customizing] #navigator-toolbox { #navigator-toolbox:hover,
position: relative !important; #navigator-toolbox[zen-has-hover],
transform: none !important; #navigator-toolbox:focus-within,
opacity: 1 !important; #navigator-toolbox[zen-user-show],
} #navigator-toolbox[flash-popup],
#navigator-toolbox[has-popup-menu],
#navigator-toolbox[movingtab],
#mainPopupSet:has(> #appMenu-popup:hover) ~ toolbox,
#navigator-toolbox:has(.tabbrowser-tab:active),
#navigator-toolbox:has(*[open='true']:not(tab):not(#zen-sidepanel-button)) {
opacity: 1;
#navigator-toolbox[inFullscreen] > #PersonalToolbar, transform: translate3d(calc(100% - var(--zen-element-separation)), -50%, 0);
#PersonalToolbar[collapsed='true'] { #browser:has(#navigator-toolbox[zen-right-side='true']) & {
display: none; transform: translate3d(calc(-100% + var(--zen-element-separation)), -50%, 0);
} }
:root:not([inDOMFullscreen='true']) #tabbrowser-tabbox #tabbrowser-tabpanels {
padding-left: var(--zen-element-separation) !important;
} }
#zen-appcontent-navbar-container {
z-index: 2;
} }
@media (-moz-bool-pref: 'zen.view.compact.hide-toolbar') { @media (-moz-bool-pref: 'zen.view.compact.hide-toolbar') {
#zen-appcontent-navbar-container {
--urlbar-height: unset; #navigator-toolbox {
transition: 0.2s ease-in-out; --zen-toolbox-top-align: var(--zen-element-separation);
transform: translateY(calc(-100% + var(--zen-element-separation)));
opacity: 0;
position: absolute;
width: 100%;
border-bottom-left-radius: 8px;
border-bottom-right-radius: 8px;
border-top-left-radius: env(-moz-gtk-csd-titlebar-radius);
border-top-right-radius: env(-moz-gtk-csd-titlebar-radius);
border-bottom: 1px solid var(--zen-colors-border);
top: 0;
background: var(--zen-colors-tertiary);
transition: 0.2s ease-in-out;
} }
#zen-appcontent-navbar-container:hover, &:not([inDOMFullscreen='true']) #tabbrowser-tabpanels {
#zen-appcontent-navbar-container:focus-within,
#zen-appcontent-navbar-container:active,
#zen-appcontent-navbar-container[zen-user-show],
#mainPopupSet:has(> #appMenu-popup:hover) ~ #zen-appcontent-navbar-container,
#zen-appcontent-navbar-container:has(*[open='true']) {
transform: translateY(0);
opacity: 1;
}
:root:not([inDOMFullscreen='true']) #tabbrowser-tabpanels {
padding-top: var(--zen-element-separation) !important; padding-top: var(--zen-element-separation) !important;
} }
#zen-sidebar-web-panel-wrapper { #zen-appcontent-navbar-container {
margin-top: 10px !important; position: absolute;
} top: 0;
transform: translateY(calc(-100% + var(--zen-element-separation) + 1px));
left: 0;
z-index: 10;
background: var(--zen-themed-toolbar-bg);
box-shadow: 0 0 2px 2px rgba(0,0,0,.1) !important;
border-bottom-left-radius: var(--zen-border-radius);
border-bottom-right-radius: var(--zen-border-radius);
border: 1px solid var(--zen-colors-border);
border-top-width: 0px;
transition: all 0.2s ease-in-out;
width: 100%;
opacity: 0;
} }
#navigator-toolbox[zen-right-side='true'] { #zen-appcontent-navbar-container:hover,
& { #zen-appcontent-navbar-container[zen-has-hover],
right: 0 !important; #zen-appcontent-navbar-container:focus-within,
transform: translateX(calc(100% - (var(--zen-compact-toolbox-margin-single) / 2))) !important; #zen-appcontent-navbar-container[zen-user-show],
} #zen-appcontent-navbar-container[has-popup-menu],
#zen-appcontent-navbar-container:has(*[open='true']) {
&:hover,
&:focus-within,
&[zen-user-show],
&[flash-popup],
&[movingtab],
&:has(.tabbrowser-tab:active),
& #mainPopupSet:has(> #appMenu-popup:hover) ~ toolbox,
&:has(*[open='true']:not(tab):not(#zen-sidepanel-button)) {
transform: none !important;
opacity: 1; opacity: 1;
border-top-width: 1px;
& > * { transform: translateY(-1px);
pointer-events: all;
} }
} }
} }

View File

@@ -18,7 +18,6 @@
#tabbrowser-tabpanels[zen-split-view='true'] > [zen-split='true'] { #tabbrowser-tabpanels[zen-split-view='true'] > [zen-split='true'] {
flex: 1; flex: 1;
margin-right: 5px;
} }
#tabbrowser-tabpanels[zen-split-view='true'] > [zen-split-anim='true'] { #tabbrowser-tabpanels[zen-split-view='true'] > [zen-split-anim='true'] {
@@ -31,8 +30,27 @@
#tabbrowser-tabpanels:has(> [zen-split='true']) { #tabbrowser-tabpanels:has(> [zen-split='true']) {
display: grid; display: grid;
row-gap: var(--zen-element-separation); row-gap: 0;
column-gap: calc(var(--zen-element-separation) / 2); column-gap: 0;
--zen-split-row-gap: calc(var(--zen-element-separation) + 2px);
--zen-split-column-gap: calc(var(--zen-element-separation) + 1px);
}
#tabbrowser-tabpanels[zen-split-view] {
.zen-split-view-splitter {
display: inherit;
}
}
.zen-split-view-splitter {
display: none;
visibility: inherit;
cursor: ew-resize;
-moz-subtree-hidden-only-visually: 0;
}
.zen-split-view-splitter[orient='horizontal'] {
cursor: n-resize;
} }
#zen-split-views-box:not([hidden='true']) { #zen-split-views-box:not([hidden='true']) {

View File

@@ -68,12 +68,16 @@
} }
#zen-sidebar-web-panel-wrapper:has(#zen-sidebar-web-panel[pinned='true']) { #zen-sidebar-web-panel-wrapper:has(#zen-sidebar-web-panel[pinned='true']) {
margin: var(--zen-appcontent-separator-from-window);
position: absolute; position: absolute;
z-index: 1; z-index: 1;
width: -moz-available; width: -moz-available;
padding: var(--zen-sidebar-web-panel-spacing); margin: var(--zen-sidebar-web-panel-spacing);
height: calc(100% - var(--zen-element-separation)); /* Why times 3?
* + 1 for the top margin, making the element overflow the view.
* + 1 for the margin we want to add at the bottom
* + 1 so that the panel can be correctly spaced from the border of the webview
*/
height: calc(100% - var(--zen-sidebar-web-panel-spacing) * 3);
} }
#zen-sidebar-web-panel { #zen-sidebar-web-panel {
@@ -147,6 +151,7 @@
position: absolute; position: absolute;
z-index: 1; z-index: 1;
animation: zen-sidebar-panel-animation-2 0.15s ease-in-out forwards; animation: zen-sidebar-panel-animation-2 0.15s ease-in-out forwards;
max-height: 100%;
} }
#zen-sidebar-web-panel[hidden='true'][pinned='true'] { #zen-sidebar-web-panel[hidden='true'][pinned='true'] {

View File

@@ -4,18 +4,30 @@ toolbar {
} }
#zen-profile-button { #zen-profile-button {
display: flex;
justify-content: center;
position: relative;
align-items: center;
list-style-image: var(--avatar-image-url);
position: relative;
& image { & stack {
display: flex; padding: 0;
justify-content: center; }
align-items: center;
padding: 8px; & .toolbarbutton-badge {
display: none !important;
}
& #zen-profile-button-icon {
width: 16px;
height: 16px;
list-style-image: var(--avatar-image-url);
border-radius: 50%;
pointer-events: none;
list-style-image: var(--avatar-image-url);
-moz-context-properties: fill;
fill: currentColor;
}
}
@media not (-moz-bool-pref: 'zen.view.sidebar-expanded.show-button') {
#zen-expand-sidebar-button {
display: none !important;
} }
} }
@@ -54,3 +66,8 @@ toolbar {
} }
} }
} }
/* Menubar */
#toolbar-menubar {
display: none !important;
}

View File

@@ -8,9 +8,17 @@
height: 100%; height: 100%;
} }
#TabsToolbar > * {
justify-content: center;
}
#private-browsing-indicator-with-label {
display: none !important;
}
#browser { #browser {
--zen-toolbox-padding: 5px; --zen-toolbox-padding: 5px;
--zen-toolbox-top-align: var(--zen-toolbox-padding);
} }
#navigator-toolbox { #navigator-toolbox {
@@ -18,33 +26,79 @@
--tab-border-radius: var(--border-radius-medium); --tab-border-radius: var(--border-radius-medium);
--zen-toolbox-min-width: 1px; --zen-toolbox-min-width: 1px;
--tab-hover-background-color: var(--toolbarbutton-hover-background) !important;
min-width: var(--zen-toolbox-min-width); min-width: var(--zen-toolbox-min-width);
margin-top: 0 !important; /* Fix full screen mode */
padding: var(--zen-toolbox-padding); padding: var(--zen-toolbox-padding);
padding-top: var(--zen-toolbox-top-align); padding-top: var(--zen-toolbox-top-align);
padding-bottom: var(--zen-element-separation);
display: flex;
} }
#TabsToolbar-customization-target { #TabsToolbar-customization-target {
gap: var(--zen-toolbox-padding); position: relative;
gap: 0;
&::after {
content: '';
display: block;
height: 1px;
background: color-mix(in srgb, var(--zen-colors-border) 70%, transparent 30%);
margin: 0 auto;
width: 80%;
left: 50%;
transform: translateX(-50%);
position: absolute;
bottom: calc(-1 * var(--zen-toolbox-padding));
}
& > * {
border-top-width: 0 !important;
}
}
#vertical-tabs-newtab-button {
&:hover, &:not(:is(:hover, :active)) .toolbarbutton-icon {
background: transparent !important;
}
} }
#tabbrowser-tabs { #tabbrowser-tabs {
margin-inline-start: 0 !important; margin-inline-start: 0 !important;
padding-inline-start: 0 !important; padding-inline-start: 0 !important;
grid-gap: 2px !important;
border-bottom: 1px solid var(--zen-colors-border) !important; position: relative;
border-bottom: 0px solid transparent !important;
--tab-block-margin: 2px; --tab-block-margin: 2px;
--tab-selected-bgcolor: var(--zen-colors-primary);
grid-gap: 0 !important;
& .tabbrowser-tab { & .tabbrowser-tab {
animation: zen-slide-in 0.2s;
max-width: unset !important; max-width: unset !important;
padding: 0 !important; padding: 0 !important;
position: relative;
height: calc(var(--tab-min-height) + var(--tab-block-margin) * 2) !important;
min-height: calc(var(--tab-min-height) + var(--tab-block-margin) * 2) !important;
border-radius: var(--border-radius-medium);
& .tab-background { & .tab-background {
overflow: hidden; overflow: hidden;
&:is([selected], [multiselected]) {
@media not (prefers-color-scheme: dark) {
border: 1px solid color-mix(in srgb, var(--zen-colors-primary) 60%, transparent 40%) !important;
}
}
& .tab-context-line { & .tab-context-line {
margin: 0 0px !important; margin: 0 0px !important;
width: 3px !important; width: 3px !important;
@@ -61,30 +115,22 @@
#zen-sidebar-icons-wrapper { #zen-sidebar-icons-wrapper {
background: transparent; background: transparent;
padding: 0;
gap: 5px;
align-items: center;
& toolbarbutton { & > toolbarbutton:not(#zen-workspaces-button) {
width: fit-content;
padding: 0 !important; padding: 0 !important;
} }
} }
#newtab-button-container { #newtab-button-container {
margin-inline-end: 0 !important; display: none !important;
padding-top: 0 !important;
border-top: solid transparent 0px !important;
&[showborder] {
padding-top: 4px !important;
&::before {
content: '';
display: block;
height: 1px;
background: color-mix(in srgb, var(--zen-colors-border) 70%, transparent 30%);
margin: 0 auto;
margin-block-end: 4px;
width: 80%;
} }
#tabbrowser-arrowscrollbox {
&::part(scrollbox) {
gap: 0px !important;
} }
} }
@@ -107,101 +153,202 @@
/* Mark: toolbox as expanded */ /* Mark: toolbox as expanded */
#navigator-toolbox:is( #navigator-toolbox:is(
#navigator-toolbox[zen-user-hover='true']:hover, #navigator-toolbox[zen-user-hover='true'][zen-has-hover],
#navigator-toolbox[zen-user-hover='true']:focus-within, #navigator-toolbox[zen-user-hover='true']:focus-within,
#navigator-toolbox[zen-user-hover='true'][movingtab], #navigator-toolbox[zen-user-hover='true'][movingtab],
#navigator-toolbox[zen-user-hover='true'][flash-popup], #navigator-toolbox[zen-user-hover='true'][flash-popup],
#mainPopupSet[zen-user-hover='true']:has(> #appMenu-popup:hover) ~ toolbox, #navigator-toolbox[zen-user-hover='true'][has-popup-menu],
#navigator-toolbox[zen-user-hover='true']:has(*[open='true']:not(tab):not(#zen-sidepanel-button)), #navigator-toolbox[zen-user-hover='true']:has(*[open='true']:not(tab):not(#zen-sidepanel-button)),
#navigator-toolbox[zen-expanded='true']:not([zen-user-hover='true'])) { #navigator-toolbox[zen-expanded='true']:not([zen-user-hover='true'])) {
--zen-toolbox-min-width: 150px; --zen-toolbox-min-width: fit-content;
& #titlebar {
min-width: 150px;
}
& #zen-workspaces-button {
margin-left: 2px;
margin-right: 2px;
& .zen-workspace-sidebar-icon[no-icon='true'] {
display: none;
}
}
& #zen-sidebar-icons-wrapper { & #zen-sidebar-icons-wrapper {
display: grid; display: flex;
/* Make sure the icons take most of the space, smartly */ /* Make sure the icons take most of the space, smartly */
grid-template-columns: repeat(auto-fit, minmax(34px, auto)); flex-direction: row;
gap: 4px;
justify-content: space-between; justify-content: space-between;
padding-top: calc(var(--zen-toolbox-padding) * 2); padding-top: var(--zen-element-separation);
width: calc(100% - var(--zen-toolbox-padding)); width: 100%;
position: relative; position: relative;
--toolbarbutton-inner-padding: var(--zen-toolbar-button-inner-padding) !important;
} }
/* Mark: Fix separator paddings */ /* Mark: Fix separator paddings */
&[zen-right-side='true'] { &[zen-right-side='true'] {
padding-left: 0 !important; padding-left: 0;
} }
&:not([zen-right-side='true']) { &:not([zen-right-side='true']) {
padding-right: 0 !important; padding-right: 0;
} }
& #newtab-button-container { & #TabsToolbar-customization-target {
&::before { &::after {
width: 100%; width: 100%;
margin-block-end: calc(var(--zen-toolbox-padding) + 2px); bottom: calc(-0.5 * var(--zen-toolbox-padding));
} }
& #vertical-tabs-newtab-button { & > *:not(tabs):not(#search-container) {
padding: 0 !important; width: 100%;
border-radius: var(--tab-border-radius);
padding-left: var(--toolbarbutton-inner-padding);
padding-right: var(--toolbarbutton-inner-padding);
& label { & label {
display: flex; display: flex;
text-align: start; width: 0;
align-items: center;
padding: 0;
} }
&:hover * { & image {
height: 16px;
width: 16px;
padding: 0 !important;
}
&:is([open], [checked]) {
background: var(--toolbarbutton-active-background) !important;
& image, label {
background: transparent !important; background: transparent !important;
} }
} }
&:hover {
background: var(--toolbarbutton-hover-background) !important;
& image, label {
background: transparent !important;
}
}
}
} }
& #tabbrowser-tabs { & #tabbrowser-tabs {
& .tabbrowser-tab { & .tabbrowser-tab {
&:not([pinned]):is(:hover, [visuallyselected]) .tab-close-button { & .tab-background {
display: block !important; @media not (prefers-color-scheme: dark) {
} box-shadow: none !important;
} }
} }
@media (-moz-bool-pref: 'zen.view.sidebar-expanded.on-hover') { &:not([pinned]):is(:hover, [visuallyselected]) .tab-close-button {
:root:not([zen-sidebar-legacy='true']) #navigator-toolbox:is([zen-user-hover='true']:hover, :not([zen-user-hover='true'])) { display: block !important;
padding-right: 47px !important; }
.tab-throbber,
.tab-icon-pending,
.tab-icon-image,
.tab-sharing-icon-overlay,
.tab-icon-overlay {
&:not([pinned]) {
margin-inline-end: var(--toolbarbutton-inner-padding) !important;
margin-inline-start: calc(var(--toolbarbutton-inner-padding) / 4) !important;
}
}
} }
} }
} }
/* Mark: toolbox as collapsed */ /* Mark: toolbox as collapsed */
#navigator-toolbox:not(#navigator-toolbox:is( #navigator-toolbox:not(#navigator-toolbox:is(
#navigator-toolbox[zen-user-hover='true']:hover, #navigator-toolbox[zen-user-hover='true'][zen-has-hover],
#navigator-toolbox[zen-user-hover='true']:focus-within, #navigator-toolbox[zen-user-hover='true']:focus-within,
#navigator-toolbox[zen-user-hover='true'][movingtab], #navigator-toolbox[zen-user-hover='true'][movingtab],
#navigator-toolbox[zen-user-hover='true'][flash-popup], #navigator-toolbox[zen-user-hover='true'][flash-popup],
#mainPopupSet[zen-user-hover='true']:has(> #appMenu-popup:hover) ~ toolbox, #navigator-toolbox[zen-user-hover='true'][has-popup-menu],
#navigator-toolbox[zen-user-hover='true']:has(*[open='true']:not(tab):not(#zen-sidepanel-button)), #navigator-toolbox[zen-user-hover='true']:has(*[open='true']:not(tab):not(#zen-sidepanel-button)),
#navigator-toolbox[zen-expanded='true']:not([zen-user-hover='true']))) { #navigator-toolbox[zen-expanded='true']:not([zen-user-hover='true']))) {
--zen-toolbox-max-width: 50px; --zen-toolbox-max-width: 51px;
max-width: var(--zen-toolbox-max-width) !important; max-width: var(--zen-toolbox-max-width) !important;
min-width: calc(var(--zen-toolbox-max-width) + var(--zen-toolbox-padding) / 2 + 2px) !important;
#vertical-tabs-newtab-button { & #vertical-tabs-newtab-button {
padding: 0 !important; padding: 0 !important;
background: transparent !important; background: transparent !important;
} }
:root[customizing] & #zen-sidebar-icons-wrapper {
min-width: unset !important;
}
& #zen-sidebar-icons-wrapper { & #zen-sidebar-icons-wrapper {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding-top: calc(var(--zen-toolbox-padding) * 2); padding-top: var(--zen-element-separation);
align-items: center;
} }
:root:has(&) #zen-sidebar-splitter { :root:has(&) #zen-sidebar-splitter {
display: none !important; display: none !important;
} }
& #vertical-pinned-tabs-container:has(tab:not([hidden])) {
margin-bottom: 8px;
position: relative;
&::after {
bottom: -4px;
content: '';
display: block;
height: 1px;
background: color-mix(in srgb, var(--zen-colors-border) 80%, transparent 20%);
width: 70%;
left: 50%;
transform: translateX(-50%);
position: absolute;
}
}
& #zen-workspaces-button[as-button='true']::after {
content: '';
display: block;
height: 80%;
width: 3px;
background: color-mix(in srgb, var(--zen-primary-color) 50%, transparent 50%);
position: absolute;
left: calc(-1 * var(--zen-toolbox-padding) - 1px);
top: 50%;
transform: translateY(-50%);
border-top-right-radius: var(--zen-border-radius);
border-bottom-right-radius: var(--zen-border-radius);
}
&[zen-right-side='true'] #zen-workspaces-button[as-button='true']::after {
left: unset;
right: calc(-1 * var(--zen-toolbox-padding) - 1px);
border-top-left-radius: var(--zen-border-radius);
border-bottom-left-radius: var(--zen-border-radius);
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
& #TabsToolbar-customization-target {
padding-bottom: var(--zen-toolbox-padding);
&::after {
bottom: -1px !important;
}
}
& #tabbrowser-tabs { & #tabbrowser-tabs {
--tab-min-width: 36px !important; --tab-min-width: 36px !important;
@@ -210,6 +357,12 @@
width: var(--tab-min-width) !important; width: var(--tab-min-width) !important;
height: var(--tab-min-width) !important; height: var(--tab-min-width) !important;
& .tab-background:is([selected], [multiselected]) {
@media not (prefers-color-scheme: dark) {
box-shadow: 0 0 1px 1px rgba(0,0,0,.05) !important;
}
}
& .tab-content { & .tab-content {
display: flex; display: flex;
align-content: center; align-content: center;
@@ -225,6 +378,56 @@
} }
} }
} }
#vertical-pinned-tabs-container {
display: flex;
flex-direction: column;
gap: 0 !important;
}
@media (-moz-bool-pref: 'zen.view.sidebar-collapsed.hide-mute-button') {
& .tab-icon-overlay:is([soundplaying], [muted]):not([selected]) {
display: none !important;
:is(
:root[uidensity=compact],
#tabbrowser-tabs[secondarytext-unsupported],
:root:not([uidensity=compact]) #tabbrowser-tabs:not([secondarytext-unsupported]) .tabbrowser-tab:hover
) .tab-icon-stack[indicator-replaces-favicon] > :not(&),
:root:not([uidensity=compact]) #tabbrowser-tabs:not([secondarytext-unsupported]) .tabbrowser-tab:not(:hover) &[indicator-replaces-favicon] {
opacity: 1 !important;
}
}
}
& .tab-throbber, & .tab-icon-pending, & .tab-icon-image, & .tab-sharing-icon-overlay, & .tab-icon-overlay {
margin-inline-end: 0 !important;
}
}
& #zen-workspaces-button {
flex-direction: column;
&:not([as-button='true']) {
& toolbarbutton {
&[active='true']::after {
bottom: 50% !important;
transform: translateY(50%) !important;
}
:root:has(#navigator-toolbox:not([zen-right-side='true'])) &[active='true']::after {
left: -2px;
animation: zen-workspaces-button-active-collapsed-left 0.1s ease-in-out !important;
}
:root:has(#navigator-toolbox[zen-right-side='true']) &[active='true']::after {
left: unset !important;
right: -2px;
animation: zen-workspaces-button-active-collapsed-right 0.1s ease-in-out !important;
}
}
}
} }
} }
@@ -246,8 +449,6 @@
} }
#TabsToolbar { #TabsToolbar {
--hovered-verticaltab-width: 20em;
z-index: 1; z-index: 1;
background-repeat: no-repeat !important; background-repeat: no-repeat !important;
background-position: center center !important; background-position: center center !important;
@@ -261,14 +462,14 @@
border-top-right-radius: var(--zen-border-radius); border-top-right-radius: var(--zen-border-radius);
} }
#navigator-toolbox:hover, #navigator-toolbox[zen-has-hover],
#navigator-toolbox:focus-within, #navigator-toolbox:focus-within,
#navigator-toolbox[movingtab], #navigator-toolbox[movingtab],
#navigator-toolbox[flash-popup], #navigator-toolbox[flash-popup],
#mainPopupSet:has(> #appMenu-popup:hover) ~ toolbox, #navigator-toolbox[has-popup-menu],
#navigator-toolbox:has(.tabbrowser-tab:active), #navigator-toolbox:has(.tabbrowser-tab:active),
#navigator-toolbox:has(*[open='true']:not(tab):not(#zen-sidepanel-button)) { #navigator-toolbox:has(*[open='true']:not(tab):not(#zen-sidepanel-button)) {
--zen-navigation-toolbar-min-width: 3.4rem !important; --zen-navigation-toolbar-min-width: 55.5px !important; /* + the width of the splitter */
max-width: var(--zen-navigation-toolbar-min-width) !important; max-width: var(--zen-navigation-toolbar-min-width) !important;
min-width: var(--zen-navigation-toolbar-min-width) !important; min-width: var(--zen-navigation-toolbar-min-width) !important;
@@ -284,6 +485,7 @@
padding: var(--zen-toolbox-padding); padding: var(--zen-toolbox-padding);
transition: 0 !important; transition: 0 !important;
animation: zen-vtabs-animation 0.3s ease-in-out; animation: zen-vtabs-animation 0.3s ease-in-out;
-moz-window-dragging: no-drag;
} }
&[zen-right-side='true'] #TabsToolbar { &[zen-right-side='true'] #TabsToolbar {
@@ -305,37 +507,6 @@
display: none !important; display: none !important;
visibility: hidden !important; visibility: hidden !important;
} }
& #zen-sidebar-icons-wrapper {
display: block !important;
}
& .zen-sidebar-action-button {
width: 100%;
border-radius: var(--zen-button-border-radius);
&:hover {
background: var(--button-hover-bgcolor);
}
& > *,
&:hover > * {
background: transparent !important;
--toolbarbutton-active-background: transparent;
}
& label:not(.toolbarbutton-badge) {
--toolbarbutton-hover-background: transparent;
display: block !important;
text-align: start;
}
}
#navigator-toolbox,
#titlebar,
#TabsToolbar {
transition: .1s !important;
}
} }
} }
@@ -349,4 +520,66 @@
order: 2; order: 2;
} }
} }
/* Mark: Override the default tab close button */
#tabbrowser-tabs {
& .tabbrowser-tab {
&[pinned] .tab-close-button {
display: none !important;
}
&[selected] .tab-background {
background: var(--zen-colors-secondary) !important;
}
}
}
/* Customization mode */
/*:root[customizing] #TabsToolbar > *:not(#zen-sidebar-icons-wrapper) {
overflow: hidden;
max-width: 0 !important;
margin-right: var(--zen-element-separation);
padding: 0 !important;
opacity: 0;
display: none;
}*/
:root[customizing] #TabsToolbar > *,
:root[customizing] #TabsToolbar-customization-target {
min-width: unset !important;
}
/* Mark: Sidebar top buttons */
#zen-sidebar-top-buttons {
order: -1;
min-width: unset !important;
--toolbarbutton-inner-padding: var(--zen-toolbar-button-inner-padding) !important;
& #zen-sidebar-top-buttons-customization-target {
height: 100%;
align-items: center;
#nav-bar:has(&) & {
padding-inline-start: calc(var(--zen-toolbox-padding) + var(--toolbarbutton-outer-padding));
}
#browser:has(#navigator-toolbox[zen-right-side='true']) & {
padding-inline-start: calc(var(--zen-toolbox-padding) - var(--toolbarbutton-outer-padding)) !important;
}
& toolbarbutton {
height: 100%;
padding: 0 var(--toolbarbutton-outer-padding) !important;
}
}
& .zen-sidebar-action-button {
padding: 0 !important;
& label {
display: none !important;
}
}
}
} }

View File

@@ -74,6 +74,11 @@
--zen-button-border-radius: 7px; --zen-button-border-radius: 7px;
--zen-button-padding: 0.6rem 1.2rem; --zen-button-padding: 0.6rem 1.2rem;
/* Toolbar */
--zen-toolbar-height: 39px;
--zen-toolbar-button-inner-padding: 6px;
--toolbarbutton-outer-padding: 4px;
/* Other colors */ /* Other colors */
--urlbar-box-bgcolor: var(--zen-urlbar-background) !important; --urlbar-box-bgcolor: var(--zen-urlbar-background) !important;
--toolbar-field-focus-background-color: var(--urlbar-box-bgcolor) !important; --toolbar-field-focus-background-color: var(--urlbar-box-bgcolor) !important;
@@ -103,6 +108,8 @@
--fp-contextmenu-bgcolor: light-dark(Menu, rgb(43 42 51 / 0.95)); --fp-contextmenu-bgcolor: light-dark(Menu, rgb(43 42 51 / 0.95));
--toolbar-bgcolor: transparent; --toolbar-bgcolor: transparent;
--toolbarbutton-active-background: var(--zen-colors-border) !important;
--input-bgcolor: var(--zen-colors-tertiary) !important; --input-bgcolor: var(--zen-colors-tertiary) !important;
--input-border-color: var(--zen-input-border-color) !important; --input-border-color: var(--zen-input-border-color) !important;
--zen-themed-toolbar-bg: var(--zen-colors-tertiary); --zen-themed-toolbar-bg: var(--zen-colors-tertiary);

View File

@@ -1,4 +1,5 @@
#nav-bar { #nav-bar,
#zen-sidebar-top-buttons {
background: transparent; background: transparent;
} }

View File

@@ -1,5 +1,10 @@
/* URL and tool bars */ /* URL and tool bars */
#urlbar-container {
padding-block: 0 !important;
padding-bottom: 2px !important;
}
#urlbar { #urlbar {
--toolbarbutton-border-radius: 10px; --toolbarbutton-border-radius: 10px;
--urlbarView-separator-color: var(--zen-colors-border); --urlbarView-separator-color: var(--zen-colors-border);
@@ -171,32 +176,6 @@ button.popup-notification-dropmarker {
margin-top: 5px; margin-top: 5px;
} }
:root:not([zen-sidebar-legacy='true']) {
@media (max-width: 650px) {
#urlbar-container {
width: calc(176px + 2 * (24px + 2 * var(--toolbarbutton-inner-padding)));
}
#nav-bar[downloadsbuttonshown] #urlbar-container,
#nav-bar[unifiedextensionsbuttonshown] #urlbar-container {
width: calc(76px + 24px + 2 * var(--toolbarbutton-inner-padding));
}
#nav-bar[downloadsbuttonshown][unifiedextensionsbuttonshown] #urlbar-container {
width: 176px;
}
#identity-icon-box {
max-width: 70px;
}
#urlbar-zoom-button {
display: none;
}
}
}
:root[zen-sidebar-legacy='true'] {
@media (max-width: 550px) { @media (max-width: 550px) {
#urlbar-container { #urlbar-container {
width: calc(176px + 2 * (24px + 2 * var(--toolbarbutton-inner-padding))); width: calc(176px + 2 * (24px + 2 * var(--toolbarbutton-inner-padding)));
@@ -219,7 +198,6 @@ button.popup-notification-dropmarker {
display: none; display: none;
} }
} }
}
/* Thanks to https://github.com/JLBlk! /* Thanks to https://github.com/JLBlk!
* Checkout https://github.com/JLBlk/Zen-Themes/blob/main/SuperUrlBar/SuperUrlBar.css * Checkout https://github.com/JLBlk/Zen-Themes/blob/main/SuperUrlBar/SuperUrlBar.css
@@ -272,6 +250,16 @@ button.popup-notification-dropmarker {
} }
} }
#nav-bar,
#zen-sidebar-top-buttons {
min-height: var(--zen-toolbar-height) !important;
height: var(--zen-toolbar-height) !important;
max-height: var(--zen-toolbar-height) !important;
display: flex;
align-items: center;
}
/* Other small tweaks */ /* Other small tweaks */
#nav-bar-customization-target { #nav-bar-customization-target {
/* Don't grow if potentially-user-sized elements (like the searchbar or the /* Don't grow if potentially-user-sized elements (like the searchbar or the
@@ -279,9 +267,20 @@ button.popup-notification-dropmarker {
* available space as much as possible, see bug 1795260. */ * available space as much as possible, see bug 1795260. */
min-width: 0; min-width: 0;
--toolbarbutton-inner-padding: var(--zen-toolbar-button-inner-padding);
/* Add space to beginning of toolbar and make that space click the first <toolbarbutton> */ /* Add space to beginning of toolbar and make that space click the first <toolbarbutton> */
> :is(toolbarbutton, toolbaritem):first-child, > :is(toolbarbutton, toolbaritem):first-child,
> toolbarpaletteitem:first-child > :is(toolbarbutton, toolbaritem) { > toolbarpaletteitem:first-child > :is(toolbarbutton, toolbaritem) {
padding-inline-start: 0; padding-inline-start: 0;
} }
} }
/* TODO: Fix this for windows and macos */
/*.titlebar-button:last-child {
padding-right: var(--zen-element-separation) !important;
}*/
#PersonalToolbar:not([collapsed="true"]) {
padding-bottom: 6px;
}

View File

@@ -1,12 +1,73 @@
#zen-workspaces-button { #zen-workspaces-button {
border: 1px solid var(--zen-colors-border);
border-radius: var(--zen-button-border-radius);
min-height: 33px;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
display: flex; display: flex;
box-shadow: rgba(0, 0, 0, 0.05) 0px 1px 2px 0px;
-moz-window-dragging: no-drag; position: relative;
&:not([as-button='true']) {
border-radius: var(--zen-button-border-radius);
background: color-mix(in srgb, var(--zen-colors-border) 50%, transparent 50%);
padding: 5px;
height: fit-content;
gap: 3px;
& toolbarbutton {
margin: 0 !important;
width: 25px;
display: flex;
justify-content: center;
padding: 0 !important;
align-items: center;
position: relative;
& > * {
opacity: .6;
}
&[active='true']::after {
content: '';
position: absolute;
width: 4px;
border-radius: 99px;
height: 4px;
background: var(--zen-primary-color);
bottom: -2px;
left: 50%;
transform: translateX(-50%);
animation: zen-workspaces-button-active 0.1s ease-in-out;
}
}
}
&[as-button='true'] {
border-radius: var(--tab-border-radius);
&:hover {
background: var(--toolbarbutton-hover-background);
}
}
:root:has(#navigator-toolbox:not([zen-expanded='true'])) &[as-button='true'] {
margin: 0 !important;
padding: var(--toolbarbutton-inner-padding) !important;
width: calc(2 * var(--toolbarbutton-inner-padding) + 16px) !important;
height: calc(2 * var(--toolbarbutton-inner-padding) + 16px) !important;
border-radius: var(--tab-border-radius) !important;
&:hover {
background: var(--toolbarbutton-hover-background) !important;
}
}
}
#zen-workspaces-button .zen-workspace-sidebar-wrapper {
position: absolute;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
pointer-events: none;
} }
#zen-workspaces-button .zen-workspace-sidebar-name { #zen-workspaces-button .zen-workspace-sidebar-name {
@@ -15,32 +76,43 @@
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
font-size: 12px; font-size: 13px;
} }
@media (-moz-bool-pref: 'zen.view.sidebar-expanded') { @media (-moz-bool-pref: 'zen.view.sidebar-expanded') {
/** Keep these selectors in sync with the ones in vertical-tabs.css */ /** Keep these selectors in sync with the ones in vertical-tabs.css */
#navigator-toolbox:is( #navigator-toolbox:is(
#navigator-toolbox[zen-user-hover='true']:hover, #navigator-toolbox[zen-user-hover='true'][zen-has-hover],
#navigator-toolbox[zen-user-hover='true'][has-popup-menu],
#navigator-toolbox[zen-user-hover='true']:focus-within, #navigator-toolbox[zen-user-hover='true']:focus-within,
#mainPopupSet[zen-user-hover='true']:has(> #appMenu-popup:hover) ~ toolbox, #mainPopupSet[zen-user-hover='true']:has(> #appMenu-popup:hover) ~ toolbox,
#navigator-toolbox[zen-user-hover='true']:has(*[open='true']:not(tab):not(#zen-sidepanel-button)), #navigator-toolbox[zen-user-hover='true']:has(*[open='true']:not(tab):not(#zen-sidepanel-button)),
:not([zen-user-hover='true']) :not([zen-user-hover='true'])
) { ) {
& #zen-workspaces-button { & #zen-workspaces-button[as-button='true'] {
width: calc(var(--zen-sidebar-action-button-width) - 1px) !important; width: 100% !important;
margin-top: .2rem; margin: 2px;
height: calc(var(--zen-sidebar-action-button-width) - 10px) !important; min-width: calc(2 * var(--toolbarbutton-inner-padding) + 16px);
height: calc(2 * var(--toolbarbutton-inner-padding) + 16px);
& .zen-workspace-sidebar-wrapper {
left: calc(var(--toolbarbutton-outer-padding) + 5px);
width: calc(100% - (var(--toolbarbutton-outer-padding) * 3 ));
}
} }
& #zen-workspaces-button .zen-workspace-sidebar-name { & #zen-workspaces-button .zen-workspace-sidebar-name {
display: block; display: block;
} }
& #zen-workspaces-button .zen-workspace-sidebar-icon[no-icon='true'] { & #zen-workspaces-button .zen-workspace-sidebar-icon {
margin-inline-end: 5px;
& [no-icon='true'] {
display: none; display: none;
} }
}
& #zen-workspaces-button .zen-workspace-sidebar-icon[no-icon='true'] + .zen-workspace-sidebar-name { & #zen-workspaces-button .zen-workspace-sidebar-icon[no-icon='true'] + .zen-workspace-sidebar-name {
margin-left: 0; margin-left: 0;
@@ -51,7 +123,6 @@
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
display: flex; display: flex;
padding: 2px 10px;
width: calc(100% - var(--zen-tabbrowser-padding) * 6) !important; width: calc(100% - var(--zen-tabbrowser-padding) * 6) !important;
gap: 0.5ch; gap: 0.5ch;
} }

View File

@@ -1,8 +1,16 @@
diff --git a/browser/components/customizableui/CustomizableUI.sys.mjs b/browser/components/customizableui/CustomizableUI.sys.mjs diff --git a/browser/components/customizableui/CustomizableUI.sys.mjs b/browser/components/customizableui/CustomizableUI.sys.mjs
index f466105b8290b13c672351bb68dd92644dd670fe..b195cd59d7ff07ff512e7388c9dc33f3c661d955 100644 index 289c3df7dcd6fa6b35681ce61c1e920b6a2651d7..aa7d86770cce41a720e92f63392a763b16381f55 100644
--- a/browser/components/customizableui/CustomizableUI.sys.mjs --- a/browser/components/customizableui/CustomizableUI.sys.mjs
+++ b/browser/components/customizableui/CustomizableUI.sys.mjs +++ b/browser/components/customizableui/CustomizableUI.sys.mjs
@@ -25,7 +25,7 @@ ChromeUtils.defineLazyGetter(lazy, "gWidgetsBundle", function () { @@ -13,6 +13,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
AddonManagerPrivate: "resource://gre/modules/AddonManager.sys.mjs",
BrowserUsageTelemetry: "resource:///modules/BrowserUsageTelemetry.sys.mjs",
CustomizableWidgets: "resource:///modules/CustomizableWidgets.sys.mjs",
+ ZenCustomizableUI: "chrome://browser/content/ZenCustomizableUI.sys.mjs",
HomePage: "resource:///modules/HomePage.sys.mjs",
PanelMultiView: "resource:///modules/PanelMultiView.sys.mjs",
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
@@ -25,7 +26,7 @@ ChromeUtils.defineLazyGetter(lazy, "gWidgetsBundle", function () {
return Services.strings.createBundle(kUrl); return Services.strings.createBundle(kUrl);
}); });
@@ -11,7 +19,16 @@ index f466105b8290b13c672351bb68dd92644dd670fe..b195cd59d7ff07ff512e7388c9dc33f3
const kSpecialWidgetPfx = "customizableui-special-"; const kSpecialWidgetPfx = "customizableui-special-";
@@ -253,10 +253,9 @@ var CustomizableUIInternal = { @@ -222,6 +223,8 @@ var CustomizableUIInternal = {
this._updateForNewProtonVersion();
this._markObsoleteBuiltinButtonsSeen();
+ lazy.ZenCustomizableUI.startup(this);
+
this.registerArea(
CustomizableUI.AREA_FIXED_OVERFLOW_PANEL,
{
@@ -253,10 +256,9 @@ var CustomizableUIInternal = {
"spring", "spring",
"urlbar-container", "urlbar-container",
"spring", "spring",
@@ -23,12 +40,35 @@ index f466105b8290b13c672351bb68dd92644dd670fe..b195cd59d7ff07ff512e7388c9dc33f3
lazy.resetPBMToolbarButtonEnabled ? "reset-pbm-toolbar-button" : null, lazy.resetPBMToolbarButtonEnabled ? "reset-pbm-toolbar-button" : null,
].filter(name => name); ].filter(name => name);
@@ -288,7 +287,7 @@ var CustomizableUIInternal = { @@ -288,10 +290,10 @@ var CustomizableUIInternal = {
{ {
type: CustomizableUI.TYPE_TOOLBAR, type: CustomizableUI.TYPE_TOOLBAR,
defaultPlacements: [ defaultPlacements: [
- "firefox-view-button", - "firefox-view-button",
+// "firefox-view-button", +// "firefox-view-button",
"tabbrowser-tabs", "tabbrowser-tabs",
"new-tab-button", - "new-tab-button",
"alltabs-button", - "alltabs-button",
+// "new-tab-button",
+// "alltabs-button",
],
defaultCollapsed: null,
},
@@ -331,6 +333,7 @@ var CustomizableUIInternal = {
CustomizableUI.AREA_NAVBAR,
CustomizableUI.AREA_BOOKMARKS,
CustomizableUI.AREA_TABSTRIP,
+ "zen-sidebar-top-buttons",
]);
if (AppConstants.platform != "macosx") {
toolbars.add(CustomizableUI.AREA_MENUBAR);
@@ -3289,6 +3292,9 @@ var CustomizableUIInternal = {
gSeenWidgets.add(widgetId);
}
}
+
+
+
if (gSeenWidgets.size || gNewElementCount) {
gDirty = true;
this.saveState();

View File

@@ -34,7 +34,7 @@ var gZenNewWebPanel = {
handleDialogAccept: async function (aEvent) { handleDialogAccept: async function (aEvent) {
document.commandDispatcher.focusedElement?.blur(); document.commandDispatcher.focusedElement?.blur();
let url = document.getElementById('zenNWP_url'); let url = document.getElementById('zenNWP_url');
let ua = document.getElementById('zenNWP_userAgent'); let ua = document.getElementById('zenNWP_userAgent'); // checbkox
if (!url || !ua) { if (!url || !ua) {
return; return;
} }
@@ -44,12 +44,12 @@ var gZenNewWebPanel = {
} catch (_) { } catch (_) {
urlValue = this.addHttpIfMissing(url.value); urlValue = this.addHttpIfMissing(url.value);
} }
if (!url.value || !ua.value) { if (!url.value) {
return; return;
} }
let newSite = { let newSite = {
url: urlValue, url: urlValue,
ua: ua.value, ua: ua.checked,
}; };
let currentData = JSON.parse(Services.prefs.getStringPref('zen.sidebar.data')); let currentData = JSON.parse(Services.prefs.getStringPref('zen.sidebar.data'));
let newName = 'p' + new Date().getTime(); let newName = 'p' + new Date().getTime();

View File

@@ -2,25 +2,6 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this // License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/. // file, You can obtain one at http://mozilla.org/MPL/2.0/.
const kZenColors = [
'#aac7ff',
'#74d7cb',
'#a0d490',
'#dec663',
'#ffb787',
'#dec1b1',
'#ffb1c0',
'#ddbfc3',
'#f6b0ea',
'#d4bbff',
];
const kZenOSToSmallName = {
WINNT: 'windows',
Darwin: 'macos',
Linux: 'linux',
};
var gZenMarketplaceManager = { var gZenMarketplaceManager = {
init() { init() {
const checkForUpdates = document.getElementById('zenThemeMarketplaceCheckForUpdates'); const checkForUpdates = document.getElementById('zenThemeMarketplaceCheckForUpdates');
@@ -79,123 +60,45 @@ var gZenMarketplaceManager = {
return document.getElementById('zenThemeMarketplaceList'); return document.getElementById('zenThemeMarketplaceList');
}, },
get themesDataFile() {
return PathUtils.join(PathUtils.profileDir, 'zen-themes.json');
},
get themesRootPath() {
return PathUtils.join(PathUtils.profileDir, 'chrome', 'zen-themes');
},
async removeTheme(themeId) { async removeTheme(themeId) {
const themePath = PathUtils.join(this.themesRootPath, themeId); const themePath = ZenThemesCommon.getThemeFolder(themeId);
console.info('ZenThemeMarketplaceParent(settings): Removing theme ', themePath);
console.info(`[ZenThemeMarketplaceParent:settings]: Removing theme ${themePath}`);
await IOUtils.remove(themePath, { recursive: true, ignoreAbsent: true }); await IOUtils.remove(themePath, { recursive: true, ignoreAbsent: true });
let themes = await this._getThemes(); const themes = await ZenThemesCommon.getThemes();
delete themes[themeId]; delete themes[themeId];
await IOUtils.writeJSON(this.themesDataFile, themes); await IOUtils.writeJSON(ZenThemesCommon.themesDataFile, themes);
this.triggerThemeUpdate(); this.triggerThemeUpdate();
}, },
async disableTheme(themeId) { async disableTheme(themeId) {
const themes = await this._getThemes(); const themes = await ZenThemesCommon.getThemes();
const theme = themes[themeId]; const theme = themes[themeId];
theme.enabled = false; theme.enabled = false;
await IOUtils.writeJSON(this.themesDataFile, themes); await IOUtils.writeJSON(ZenThemesCommon.themesDataFile, themes);
this._doNotRebuildThemesList = true; this._doNotRebuildThemesList = true;
this.triggerThemeUpdate(); this.triggerThemeUpdate();
}, },
async enableTheme(themeId) { async enableTheme(themeId) {
const themes = await this._getThemes(); const themes = await ZenThemesCommon.getThemes();
const theme = themes[themeId]; const theme = themes[themeId];
theme.enabled = true; theme.enabled = true;
await IOUtils.writeJSON(this.themesDataFile, themes); await IOUtils.writeJSON(ZenThemesCommon.themesDataFile, themes);
this._doNotRebuildThemesList = true; this._doNotRebuildThemesList = true;
this.triggerThemeUpdate(); this.triggerThemeUpdate();
}, },
async _getThemes() { _triggerBuildUpdateWithoutRebuild() {
if (!this._themes) { this._doNotRebuildThemesList = true;
if (!(await IOUtils.exists(this.themesDataFile))) { this.triggerThemeUpdate();
await IOUtils.writeJSON(this.themesDataFile, {});
}
this._themes = await IOUtils.readJSON(this.themesDataFile);
}
return this._themes;
},
get currentOperatingSystem() {
let os = Services.appinfo.OS;
return kZenOSToSmallName[os];
},
_getValidPreferences(preferences) {
for (let entry of preferences) {
const key = entry.property;
// [!][os:]key
let restOfPreferences = key;
let isNegation = false;
if (key.startsWith('!')) {
isNegation = true;
restOfPreferences = key.slice(1);
}
let os = '';
if (restOfPreferences.includes(':')) {
[os, restOfPreferences] = restOfPreferences.split(':');
}
if (isNegation && os === this.currentOperatingSystem) {
delete preferences[key];
} else if (os && os !== this.currentOperatingSystem && !isNegation) {
delete preferences[key];
} else {
// Change the key to contain only the rest of the preferences.
preferences[restOfPreferences] = preferences[key];
if (key !== restOfPreferences) {
delete preferences[key];
}
}
}
return preferences;
},
async _getThemePreferences(theme) {
const themePath = PathUtils.join(this.themesRootPath, theme.id, 'preferences.json');
if (!(await IOUtils.exists(themePath)) || !theme.preferences) {
return [];
}
let themePreferences = await IOUtils.readJSON(themePath);
// compat mode for old preferences, all of them can only be checkboxes
if (typeof themePreferences === 'object' && !Array.isArray(themePreferences)) {
console.warn(
`[ZenThemeMarketplaceManager]: Warning, ${theme.name} uses legacy preferences, please migrate them to the new preferences style, as legacy preferences might be removed at a future release. More information at: `
);
themePreferences = Object.entries(themePreferences).map(([property, label]) => {
return {
property,
label,
type: 'checkbox',
};
});
}
return this._getValidPreferences(themePreferences);
},
_getBrowser() {
if (!this.__browser) {
this.__browser = Services.wm.getMostRecentWindow('navigator:browser');
}
return this.__browser;
}, },
async _buildThemesList() { async _buildThemesList() {
@@ -205,15 +108,18 @@ var gZenMarketplaceManager = {
return; return;
} }
console.log('ZenThemeMarketplaceParent(settings): Building themes list'); console.log('[ZenThemeMarketplaceParent:settings]: Building themes list');
let themes = await this._getThemes(); const themes = await ZenThemesCommon.getThemes();
const browser = this._getBrowser(); const browser = ZenThemesCommon.currentBrowser;
const themeList = document.createElement('div'); const themeList = document.createElement('div');
for (let theme of Object.values(themes)) { for (const theme of Object.values(themes)) {
const sanitizedName = `theme-${theme.name?.replaceAll(/\s/g, '-')?.replaceAll(/[^A-z_-]+/g, '')}`;
const isThemeEnabled = theme.enabled === undefined || theme.enabled;
const fragment = window.MozXULElement.parseXULToFragment(` const fragment = window.MozXULElement.parseXULToFragment(`
<vbox class="zenThemeMarketplaceItem"> <vbox class="zenThemeMarketplaceItem">
<vbox class="zenThemeMarketplaceItemContent"> <vbox class="zenThemeMarketplaceItemContent">
@@ -223,14 +129,13 @@ var gZenMarketplaceManager = {
<description class="description-deemphasized zenThemeMarketplaceItemDescription"></description> <description class="description-deemphasized zenThemeMarketplaceItemDescription"></description>
</vbox> </vbox>
<hbox class="zenThemeMarketplaceItemActions"> <hbox class="zenThemeMarketplaceItemActions">
<button class="zenThemeMarketplaceItemConfigureButton" hidden="true"></button> ${theme.preferences ? `<button id="zenThemeMarketplaceItemConfigureButton-${sanitizedName}" class="zenThemeMarketplaceItemConfigureButton" hidden="true"></button>` : ''}
<button class="zenThemeMarketplaceItemUninstallButton" data-l10n-id="zen-theme-marketplace-remove-button" zen-theme-id="${theme.id}"></button> <button class="zenThemeMarketplaceItemUninstallButton" data-l10n-id="zen-theme-marketplace-remove-button" zen-theme-id="${theme.id}"></button>
</hbox> </hbox>
</vbox> </vbox>
`); `);
const themeName = `${theme.name} (v${theme.version || '1.0.0'})`; const themeName = `${theme.name} (v${theme.version || '1.0.0'})`;
const sanitizedName = `theme-${theme.name?.replaceAll(/\s/g, '-')?.replaceAll(/[^A-z_-]+/g, '')}`;
const base = fragment.querySelector('.zenThemeMarketplaceItem'); const base = fragment.querySelector('.zenThemeMarketplaceItem');
const baseHeader = fragment.querySelector('#zenThemeMarketplaceItemContentHeader'); const baseHeader = fragment.querySelector('#zenThemeMarketplaceItemContentHeader');
@@ -246,16 +151,21 @@ var gZenMarketplaceManager = {
mainDialogDiv.className = 'zenThemeMarketplaceItemPreferenceDialog'; mainDialogDiv.className = 'zenThemeMarketplaceItemPreferenceDialog';
headerDiv.className = 'zenThemeMarketplaceItemPreferenceDialogTopBar'; headerDiv.className = 'zenThemeMarketplaceItemPreferenceDialogTopBar';
headerTitle.textContent = themeName; headerTitle.textContent = themeName;
headerTitle.title = `CSS Selector: ${sanitizedName}`; browser.document.l10n.setAttributes(headerTitle, 'zen-theme-marketplace-theme-header-title', {
name: sanitizedName,
});
headerTitle.className = 'zenThemeMarketplaceItemTitle'; headerTitle.className = 'zenThemeMarketplaceItemTitle';
closeButton.id = `${sanitizedName}-modal-close`; closeButton.id = `${sanitizedName}-modal-close`;
closeButton.textContent = 'Close'; browser.document.l10n.setAttributes(closeButton, 'zen-theme-marketplace-close-modal');
contentDiv.id = `${sanitizedName}-preferences-content`; contentDiv.id = `${sanitizedName}-preferences-content`;
contentDiv.className = 'zenThemeMarketplaceItemPreferenceDialogContent'; contentDiv.className = 'zenThemeMarketplaceItemPreferenceDialogContent';
mozToggle.className = 'zenThemeMarketplaceItemPreferenceToggle'; mozToggle.className = 'zenThemeMarketplaceItemPreferenceToggle';
mozToggle.pressed = theme.enabled; mozToggle.pressed = isThemeEnabled;
mozToggle.title = theme.enabled ? 'Disable theme' : 'Enable theme'; browser.document.l10n.setAttributes(
mozToggle,
`zen-theme-marketplace-toggle-${isThemeEnabled ? 'enabled' : 'disabled'}-button`
);
baseHeader.appendChild(mozToggle); baseHeader.appendChild(mozToggle);
@@ -279,38 +189,54 @@ var gZenMarketplaceManager = {
if (!event.target.hasAttribute('pressed')) { if (!event.target.hasAttribute('pressed')) {
await this.disableTheme(themeId); await this.disableTheme(themeId);
browser.document.l10n.setAttributes(mozToggle, 'zen-theme-marketplace-toggle-disabled-button');
if (theme.preferences) {
document.getElementById(`zenThemeMarketplaceItemConfigureButton-${sanitizedName}`).setAttribute('hidden', true);
}
} else { } else {
await this.enableTheme(themeId); await this.enableTheme(themeId);
browser.document.l10n.setAttributes(mozToggle, 'zen-theme-marketplace-toggle-enabled-button');
if (theme.preferences) {
document.getElementById(`zenThemeMarketplaceItemConfigureButton-${sanitizedName}`).removeAttribute('hidden');
}
} }
}); });
fragment.querySelector('.zenThemeMarketplaceItemTitle').textContent = themeName; fragment.querySelector('.zenThemeMarketplaceItemTitle').textContent = themeName;
fragment.querySelector('.zenThemeMarketplaceItemDescription').textContent = theme.description; fragment.querySelector('.zenThemeMarketplaceItemDescription').textContent = theme.description;
fragment.querySelector('.zenThemeMarketplaceItemUninstallButton').addEventListener('click', async (event) => { fragment.querySelector('.zenThemeMarketplaceItemUninstallButton').addEventListener('click', async (event) => {
if (!confirm('Are you sure you want to remove this theme?')) { const [msg] = await document.l10n.formatValues([{ id: 'zen-theme-marketplace-remove-confirmation' }]);
if (!confirm(msg)) {
return; return;
} }
const target = event.target;
const themeId = target.getAttribute('zen-theme-id'); await this.removeTheme(event.target.getAttribute('zen-theme-id'));
await this.removeTheme(themeId);
}); });
if (theme.preferences) {
fragment.querySelector('.zenThemeMarketplaceItemConfigureButton').addEventListener('click', () => { fragment.querySelector('.zenThemeMarketplaceItemConfigureButton').addEventListener('click', () => {
dialog.showModal(); dialog.showModal();
}); });
if (theme.enabled && theme.preferences) { if (isThemeEnabled) {
fragment.querySelector('.zenThemeMarketplaceItemConfigureButton').removeAttribute('hidden'); fragment.querySelector('.zenThemeMarketplaceItemConfigureButton').removeAttribute('hidden');
} }
}
const preferences = await this._getThemePreferences(theme); const preferences = await ZenThemesCommon.getThemePreferences(theme);
if (preferences.length > 0) { if (preferences.length > 0) {
const preferencesWrapper = document.createXULElement('vbox'); const preferencesWrapper = document.createXULElement('vbox');
preferencesWrapper.classList.add('zenThemeMarketplaceItemPreferences'); preferencesWrapper.setAttribute('flex', '1');
for (let entry of preferences) { for (const entry of preferences) {
const { property, label, type } = entry; const { property, label, type, placeholder } = entry;
switch (type) { switch (type) {
case 'dropdown': { case 'dropdown': {
@@ -335,18 +261,23 @@ var gZenMarketplaceManager = {
const defaultItem = document.createXULElement('menuitem'); const defaultItem = document.createXULElement('menuitem');
defaultItem.setAttribute('value', 'none'); defaultItem.setAttribute('value', 'none');
defaultItem.setAttribute('label', '-');
if (placeholder) {
defaultItem.setAttribute('label', placeholder || '-');
} else {
browser.document.l10n.setAttributes(defaultItem, 'zen-theme-marketplace-dropdown-default-label');
}
menupopup.appendChild(defaultItem); menupopup.appendChild(defaultItem);
for (let option of options) { for (const option of options) {
const { label, value } = option; const { label, value } = option;
const valueType = typeof value; const valueType = typeof value;
if (!['string', 'number'].includes(valueType)) { if (!['string', 'number'].includes(valueType)) {
console.log( console.log(
`ZenThemeMarketplaceParent(settings): Warning, invalid data type received (${valueType}), skipping.` `[ZenThemeMarketplaceParent:settings]: Warning, invalid data type received (${valueType}), skipping.`
); );
continue; continue;
} }
@@ -378,6 +309,7 @@ var gZenMarketplaceManager = {
element.setAttribute(property?.replaceAll(/\./g, '-'), value); element.setAttribute(property?.replaceAll(/\./g, '-'), value);
Services.prefs.setStringPref(property, value === 'none' ? '' : value); Services.prefs.setStringPref(property, value === 'none' ? '' : value);
this._triggerBuildUpdateWithoutRebuild();
}); });
const nameLabel = document.createXULElement('label'); const nameLabel = document.createXULElement('label');
@@ -395,7 +327,7 @@ var gZenMarketplaceManager = {
} }
case 'checkbox': { case 'checkbox': {
const fragment = window.MozXULElement.parseXULToFragment(` const checkbox = window.MozXULElement.parseXULToFragment(`
<hbox class="zenThemeMarketplaceItemPreference"> <hbox class="zenThemeMarketplaceItemPreference">
<checkbox class="zenThemeMarketplaceItemPreferenceCheckbox" label="${label}" tooltiptext="${property}" zen-pref="${property}"></checkbox> <checkbox class="zenThemeMarketplaceItemPreferenceCheckbox" label="${label}" tooltiptext="${property}" zen-pref="${property}"></checkbox>
</hbox> </hbox>
@@ -403,13 +335,13 @@ var gZenMarketplaceManager = {
// Checkbox only works with "true" and "false" values, it's not like HTML checkboxes. // Checkbox only works with "true" and "false" values, it's not like HTML checkboxes.
if (Services.prefs.getBoolPref(property, false)) { if (Services.prefs.getBoolPref(property, false)) {
fragment.querySelector('.zenThemeMarketplaceItemPreferenceCheckbox').setAttribute('checked', 'true'); checkbox.querySelector('.zenThemeMarketplaceItemPreferenceCheckbox').setAttribute('checked', 'true');
} }
fragment.querySelector('.zenThemeMarketplaceItemPreferenceCheckbox').addEventListener('click', (event) => { checkbox.querySelector('.zenThemeMarketplaceItemPreferenceCheckbox').addEventListener('click', (event) => {
let target = event.target.closest('.zenThemeMarketplaceItemPreferenceCheckbox'); const target = event.target.closest('.zenThemeMarketplaceItemPreferenceCheckbox');
let key = target.getAttribute('zen-pref'); const key = target.getAttribute('zen-pref');
let checked = target.hasAttribute('checked'); const checked = target.hasAttribute('checked');
if (!checked) { if (!checked) {
target.removeAttribute('checked'); target.removeAttribute('checked');
@@ -420,13 +352,64 @@ var gZenMarketplaceManager = {
Services.prefs.setBoolPref(key, !checked); Services.prefs.setBoolPref(key, !checked);
}); });
preferencesWrapper.appendChild(fragment); preferencesWrapper.appendChild(checkbox);
break;
}
case 'string': {
const container = document.createXULElement('hbox');
container.classList.add('zenThemeMarketplaceItemPreference');
container.setAttribute('align', 'center');
container.setAttribute('role', 'group');
const savedValue = Services.prefs.getStringPref(property, '');
const sanitizedProperty = property?.replaceAll(/\./g, '-');
const input = document.createElement('input');
input.setAttribute('flex', '1');
input.setAttribute('type', 'text');
input.id = `${sanitizedProperty}-input`;
input.value = savedValue;
if (placeholder) {
input.setAttribute('placeholder', placeholder || '-');
} else {
browser.document.l10n.setAttributes(input, 'zen-theme-marketplace-input-default-placeholder');
}
input.addEventListener(
'input',
ZenThemesCommon.throttle((event) => {
const value = event.target.value;
Services.prefs.setStringPref(property, value);
this._triggerBuildUpdateWithoutRebuild();
if (value === '') {
browser.document.querySelector(':root').style.removeProperty(`--${sanitizedProperty}`);
} else {
browser.document.querySelector(':root').style.setProperty(`--${sanitizedProperty}`, value);
}
}, 500)
);
const nameLabel = document.createXULElement('label');
nameLabel.setAttribute('flex', '1');
nameLabel.setAttribute('class', 'zenThemeMarketplaceItemPreferenceLabel');
nameLabel.setAttribute('value', label);
nameLabel.setAttribute('tooltiptext', property);
container.appendChild(nameLabel);
container.appendChild(input);
container.setAttribute('aria-labelledby', label);
preferencesWrapper.appendChild(container);
break; break;
} }
default: default:
console.log( console.log(
`ZenThemeMarketplaceParent(settings): Warning, unknown preference type received (${type}), skipping.` `[ZenThemeMarketplaceParent:settings]: Warning, unknown preference type received (${type}), skipping.`
); );
continue; continue;
} }
@@ -450,13 +433,10 @@ var gZenLooksAndFeel = {
this._initializeTabbarExpandForm(); this._initializeTabbarExpandForm();
gZenThemeBuilder.init(); gZenThemeBuilder.init();
gZenMarketplaceManager.init(); gZenMarketplaceManager.init();
var onLegacyToolbarChange = this.onLegacyToolbarChange.bind(this);
Services.prefs.addObserver('zen.themes.tabs.legacy-location', onLegacyToolbarChange);
var onPreferColorSchemeChange = this.onPreferColorSchemeChange.bind(this); var onPreferColorSchemeChange = this.onPreferColorSchemeChange.bind(this);
window.matchMedia('(prefers-color-scheme: dark)').addListener(onPreferColorSchemeChange); window.matchMedia('(prefers-color-scheme: dark)').addListener(onPreferColorSchemeChange);
this.onPreferColorSchemeChange(); this.onPreferColorSchemeChange();
window.addEventListener('unload', () => { window.addEventListener('unload', () => {
Services.prefs.removeObserver('zen.themes.tabs.legacy-location', onLegacyToolbarChange);
window.matchMedia('(prefers-color-scheme: dark)').removeListener(onPreferColorSchemeChange); window.matchMedia('(prefers-color-scheme: dark)').removeListener(onPreferColorSchemeChange);
}); });
setTimeout(() => { setTimeout(() => {
@@ -469,6 +449,7 @@ var gZenLooksAndFeel = {
} }
}, 500); }, 500);
this.setDarkThemeListener(); this.setDarkThemeListener();
this.setCompactModeStyle();
}, },
onPreferColorSchemeChange(event) { onPreferColorSchemeChange(event) {
@@ -482,9 +463,9 @@ var gZenLooksAndFeel = {
}, },
setDarkThemeListener() { setDarkThemeListener() {
this.chooser = document.getElementById('zen-dark-theme-styles-form'); const chooser = document.getElementById('zen-dark-theme-styles-form');
this.radios = [...this.chooser.querySelectorAll('input')]; const radios = [...chooser.querySelectorAll('input')];
for (let radio of this.radios) { for (let radio of radios) {
if (radio.value === 'amoled' && Services.prefs.getBoolPref('zen.theme.color-prefs.amoled')) { if (radio.value === 'amoled' && Services.prefs.getBoolPref('zen.theme.color-prefs.amoled')) {
radio.checked = true; radio.checked = true;
} else if (radio.value === 'colorful' && Services.prefs.getBoolPref('zen.theme.color-prefs.colorful')) { } else if (radio.value === 'colorful' && Services.prefs.getBoolPref('zen.theme.color-prefs.colorful')) {
@@ -516,11 +497,43 @@ var gZenLooksAndFeel = {
} }
}, },
async onLegacyToolbarChange(event) { setCompactModeStyle() {
let buttonIndex = await confirmRestartPrompt(true, 1, true, false); const chooser = document.getElementById('zen-compact-mode-styles-form');
if (buttonIndex == CONFIRM_RESTART_PROMPT_RESTART_NOW) { const radios = [...chooser.querySelectorAll('input')];
Services.startup.quit(Ci.nsIAppStartup.eAttemptQuit | Ci.nsIAppStartup.eRestart);
return; let value = '';
if (Services.prefs.getBoolPref('zen.view.compact.hide-tabbar')
&& Services.prefs.getBoolPref('zen.view.compact.hide-toolbar')) {
value = 'both';
} else {
value = Services.prefs.getBoolPref('zen.view.compact.hide-tabbar') ? 'left' : 'top';
}
chooser.querySelector(`[value='${value}']`).checked = true;
const disableExpandTabsOnHover = () => {
if (Services.prefs.getBoolPref('zen.view.sidebar-expanded.on-hover')) {
document.querySelector(`#zen-expand-tabbar-strat input[value='expand']`).click();
}
}
for (let radio of radios) {
radio.addEventListener('change', (e) => {
let value = e.target.value;
switch (value) {
case 'left':
disableExpandTabsOnHover();
Services.prefs.setBoolPref('zen.view.compact.hide-tabbar', true);
Services.prefs.setBoolPref('zen.view.compact.hide-toolbar', false);
break;
case 'top':
Services.prefs.setBoolPref('zen.view.compact.hide-tabbar', false);
Services.prefs.setBoolPref('zen.view.compact.hide-toolbar', true);
break;
default:
disableExpandTabsOnHover();
Services.prefs.setBoolPref('zen.view.compact.hide-tabbar', true);
Services.prefs.setBoolPref('zen.view.compact.hide-toolbar', true);
break;
}
});
} }
}, },
@@ -536,6 +549,14 @@ var gZenLooksAndFeel = {
} else { } else {
form.querySelector('input[value="none"]').checked = true; form.querySelector('input[value="none"]').checked = true;
} }
const disableCompactTabbar = () => {
const toolbarEnable = Services.prefs.getBoolPref('zen.view.compact.hide-toolbar');
if (toolbarEnable) {
document.querySelector(`#ZenCompactModeStyle input[value='top']`).click();
} else if (Services.prefs.getBoolPref('zen.view.compact')) {
document.getElementById('zenLooksAndFeelShowCompactView').click();
}
}
for (let radio of radios) { for (let radio of radios) {
radio.addEventListener('change', (e) => { radio.addEventListener('change', (e) => {
switch (e.target.value) { switch (e.target.value) {
@@ -548,6 +569,7 @@ var gZenLooksAndFeel = {
Services.prefs.setBoolPref(defaultExpandPref, false); Services.prefs.setBoolPref(defaultExpandPref, false);
break; break;
case 'hover': case 'hover':
disableCompactTabbar();
Services.prefs.setBoolPref(onHoverPref, true); Services.prefs.setBoolPref(onHoverPref, true);
Services.prefs.setBoolPref(defaultExpandPref, true); Services.prefs.setBoolPref(defaultExpandPref, true);
break; break;
@@ -559,7 +581,7 @@ var gZenLooksAndFeel = {
_initializeColorPicker(accentColor) { _initializeColorPicker(accentColor) {
let elem = document.getElementById('zenLooksAndFeelColorOptions'); let elem = document.getElementById('zenLooksAndFeelColorOptions');
elem.innerHTML = ''; elem.innerHTML = '';
for (let color of kZenColors) { for (let color of ZenThemesCommon.kZenColors) {
let colorElemParen = document.createElement('div'); let colorElemParen = document.createElement('div');
let colorElem = document.createElement('div'); let colorElem = document.createElement('div');
colorElemParen.classList.add('zenLooksAndFeelColorOptionParen'); colorElemParen.classList.add('zenLooksAndFeelColorOptionParen');
@@ -582,7 +604,7 @@ var gZenLooksAndFeel = {
}, },
_getInitialAccentColor() { _getInitialAccentColor() {
return Services.prefs.getStringPref('zen.theme.accent-color', kZenColors[0]); return Services.prefs.getStringPref('zen.theme.accent-color', ZenThemesCommon.kZenColors[0]);
}, },
}; };
@@ -812,11 +834,6 @@ Preferences.addAll([
type: 'bool', type: 'bool',
default: false, default: false,
}, },
{
id: 'zen.themes.tabs.legacy-location',
type: 'bool',
default: false,
},
{ {
id: 'zen.workspaces.hide-default-container-indicator', id: 'zen.workspaces.hide-default-container-indicator',
type: 'bool', type: 'bool',
@@ -827,4 +844,9 @@ Preferences.addAll([
type: 'bool', type: 'bool',
default: true, default: true,
}, },
{
id: 'zen.workspaces.show-icon-strip',
type: 'bool',
default: true,
},
]); ]);

View File

@@ -36,10 +36,10 @@
</g> </g>
<g id="Outline"> <g id="Outline">
<g transform="matrix(0.983827,0,0,0.922551,1.56302,5.09242)"> <g transform="matrix(0.983827,0,0,0.922551,1.56302,5.09242)">
<path d="M223.674,41.506L223.674,93.788C223.674,114.914 207.591,132.065 187.78,132.065L41.807,132.065C21.996,132.065 5.913,114.914 5.913,93.788L5.913,41.506C5.913,20.38 21.996,3.228 41.807,3.228L187.78,3.228C207.591,3.228 223.674,20.38 223.674,41.506Z" style="fill:none;stroke:var(--zen-colors-secondary);stroke-width:7.21px;"/> <path d="M223.674,41.506L223.674,93.788C223.674,114.914 207.591,132.065 187.78,132.065L41.807,132.065C21.996,132.065 5.913,114.914 5.913,93.788L5.913,41.506C5.913,20.38 21.996,3.228 41.807,3.228L187.78,3.228C207.591,3.228 223.674,20.38 223.674,41.506Z" style="fill:none;stroke:var(--zen-colors-border);stroke-width:4.78px;"/>
</g> </g>
<g transform="matrix(0.790162,0,0,0.603645,44.881,47.2089)"> <g transform="matrix(0.790162,0,0,0.603645,44.881,47.2089)">
<path d="M223.674,3.228L223.674,77.954C223.674,107.819 205.151,132.065 182.335,132.065L5.913,132.065L5.913,41.506C5.913,20.38 19.016,3.228 35.155,3.228L223.674,3.228Z" style="fill:none;stroke:var(--zen-colors-secondary);stroke-width:8.78px;"/> <path d="M223.674,3.228L223.674,77.954C223.674,107.819 205.151,132.065 182.335,132.065L5.913,132.065L5.913,41.506C5.913,20.38 19.016,3.228 35.155,3.228L223.674,3.228Z" style="fill:none;stroke:var(--zen-colors-border);stroke-width:4.78px;"/>
</g> </g>
</g> </g>
<g id="Top-Bar" serif:id="Top Bar"> <g id="Top-Bar" serif:id="Top Bar">
@@ -77,14 +77,14 @@
<svg width="50%" height="50%" viewBox="0 0 229 135" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;"> <svg width="50%" height="50%" viewBox="0 0 229 135" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;">
<g id="Icon-1--Icon-2" serif:id="Icon 1, Icon 2"> <g id="Icon-1--Icon-2" serif:id="Icon 1, Icon 2">
<g transform="matrix(0.983827,0,0,0.922551,1.56302,5.09242)"> <g transform="matrix(0.983827,0,0,0.922551,1.56302,5.09242)">
<path d="M223.674,41.506L223.674,93.788C223.674,114.914 207.591,132.065 187.78,132.065L41.807,132.065C21.996,132.065 5.913,114.914 5.913,93.788L5.913,41.506C5.913,20.38 21.996,3.228 41.807,3.228L187.78,3.228C207.591,3.228 223.674,20.38 223.674,41.506Z" style="fill:color-mix(in srgb, var(--zen-colors-secondary) 40%, transparent 40%)"/> <path d="M223.674,41.506L223.674,93.788C223.674,114.914 207.591,132.065 187.78,132.065L41.807,132.065C21.996,132.065 5.913,114.914 5.913,93.788L5.913,41.506C5.913,20.38 21.996,3.228 41.807,3.228L187.78,3.228C207.591,3.228 223.674,20.38 223.674,41.506Z" style="fill:color-mix(in srgb, var(--zen-colors-secondary) 17%, transparent 98%)"/>
</g> </g>
<g id="Outline"> <g id="Outline">
<g transform="matrix(0.983827,0,0,0.922551,1.56302,5.09242)"> <g transform="matrix(0.983827,0,0,0.922551,1.56302,5.09242)">
<path d="M223.674,41.506L223.674,93.788C223.674,114.914 207.591,132.065 187.78,132.065L41.807,132.065C21.996,132.065 5.913,114.914 5.913,93.788L5.913,41.506C5.913,20.38 21.996,3.228 41.807,3.228L187.78,3.228C207.591,3.228 223.674,20.38 223.674,41.506Z" style="fill:none;stroke:var(--zen-colors-secondary);stroke-width:7.21px;"/> <path d="M223.674,41.506L223.674,93.788C223.674,114.914 207.591,132.065 187.78,132.065L41.807,132.065C21.996,132.065 5.913,114.914 5.913,93.788L5.913,41.506C5.913,20.38 21.996,3.228 41.807,3.228L187.78,3.228C207.591,3.228 223.674,20.38 223.674,41.506Z" style="fill:none;stroke:var(--zen-colors-border);stroke-width:4.78px;"/>
</g> </g>
<g transform="matrix(0.790162,0,0,0.603645,44.881,47.2089)"> <g transform="matrix(0.790162,0,0,0.603645,44.881,47.2089)">
<path d="M223.674,3.228L223.674,77.954C223.674,107.819 205.151,132.065 182.335,132.065L5.913,132.065L5.913,41.506C5.913,20.38 19.016,3.228 35.155,3.228L223.674,3.228Z" style="fill:none;stroke:var(--zen-colors-secondary);stroke-width:8.78px;"/> <path d="M223.674,3.228L223.674,77.954C223.674,107.819 205.151,132.065 182.335,132.065L5.913,132.065L5.913,41.506C5.913,20.38 19.016,3.228 35.155,3.228L223.674,3.228Z" style="fill:none;stroke:var(--zen-colors-border);stroke-width:4.78px;"/>
</g> </g>
</g> </g>
<g id="Top-Bar" serif:id="Top Bar"> <g id="Top-Bar" serif:id="Top Bar">
@@ -126,10 +126,10 @@
</g> </g>
<g id="Outline"> <g id="Outline">
<g transform="matrix(0.983827,0,0,0.922551,1.56302,5.09242)"> <g transform="matrix(0.983827,0,0,0.922551,1.56302,5.09242)">
<path d="M223.674,41.506L223.674,93.788C223.674,114.914 207.591,132.065 187.78,132.065L41.807,132.065C21.996,132.065 5.913,114.914 5.913,93.788L5.913,41.506C5.913,20.38 21.996,3.228 41.807,3.228L187.78,3.228C207.591,3.228 223.674,20.38 223.674,41.506Z" style="fill:none;stroke:var(--zen-primary-color);stroke-width:7.21px;"/> <path d="M223.674,41.506L223.674,93.788C223.674,114.914 207.591,132.065 187.78,132.065L41.807,132.065C21.996,132.065 5.913,114.914 5.913,93.788L5.913,41.506C5.913,20.38 21.996,3.228 41.807,3.228L187.78,3.228C207.591,3.228 223.674,20.38 223.674,41.506Z" style="fill:none;stroke:var(--zen-primary-color);stroke-width:4px;"/>
</g> </g>
<g transform="matrix(0.790162,0,0,0.603645,44.881,47.2089)"> <g transform="matrix(0.790162,0,0,0.603645,44.881,47.2089)">
<path d="M223.674,3.228L223.674,77.954C223.674,107.819 205.151,132.065 182.335,132.065L5.913,132.065L5.913,41.506C5.913,20.38 19.016,3.228 35.155,3.228L223.674,3.228Z" style="fill:none;stroke:var(--zen-primary-color);stroke-width:8.78px;"/> <path d="M223.674,3.228L223.674,77.954C223.674,107.819 205.151,132.065 182.335,132.065L5.913,132.065L5.913,41.506C5.913,20.38 19.016,3.228 35.155,3.228L223.674,3.228Z" style="fill:none;stroke:var(--zen-primary-color);stroke-width:4.78px;"/>
</g> </g>
</g> </g>
<g id="Top-Bar" serif:id="Top Bar"> <g id="Top-Bar" serif:id="Top Bar">
@@ -190,17 +190,48 @@
<checkbox id="zenLooksAndFeelShowCompactView" <checkbox id="zenLooksAndFeelShowCompactView"
data-l10n-id="zen-look-and-feel-compact-view-enabled" data-l10n-id="zen-look-and-feel-compact-view-enabled"
preference="zen.view.compact"/> preference="zen.view.compact"/>
<html:div id="ZenCompactModeStyle">
<form xmlns="http://www.w3.org/1999/xhtml" autocomplete="off" id="zen-compact-mode-styles-form">
<label class="web-appearance-choice">
<div class="web-appearance-choice-image-container">
<div class="zen-compact-mode-styles-browser-wrapper" left="">
<div></div>
</div>
</div>
<div class="web-appearance-choice-footer">
<input type="radio" name="web-appearance" value="left" data-l10n-id="preferences-web-appearance-choice-input-auto"
/><span data-l10n-id="zen-compact-mode-styles-left" />
</div>
</label>
<label class="web-appearance-choice">
<div class="web-appearance-choice-image-container">
<div class="zen-compact-mode-styles-browser-wrapper" top="">
<div></div>
</div>
</div>
<div class="web-appearance-choice-footer">
<input type="radio" name="web-appearance" value="top" data-l10n-id="preferences-web-appearance-choice-input-light"
/><span data-l10n-id="zen-compact-mode-styles-top" />
</div>
</label>
<label class="web-appearance-choice">
<div class="web-appearance-choice-image-container">
<div class="zen-compact-mode-styles-browser-wrapper" both="">
<div></div>
</div>
</div>
<div class="web-appearance-choice-footer">
<input type="radio" name="web-appearance" value="both" data-l10n-id="preferences-web-appearance-choice-input-dark"
/><span data-l10n-id="zen-compact-mode-styles-both" />
</div>
</label>
</form>
</html:div>
<vbox class="indent"> <vbox class="indent">
<checkbox id="zenLooksAndFeelShowCompactViewToolbar"
data-l10n-id="zen-look-and-feel-compact-view-top-toolbar"
preference="zen.view.compact.hide-toolbar"/>
<checkbox id="zenLooksAndFeelEnableToolbarFlashPopup" <checkbox id="zenLooksAndFeelEnableToolbarFlashPopup"
data-l10n-id="zen-look-and-feel-compact-toolbar-flash-popup" data-l10n-id="zen-look-and-feel-compact-toolbar-flash-popup"
preference="zen.view.compact.toolbar-flash-popup"/> preference="zen.view.compact.toolbar-flash-popup"/>
</vbox> </vbox>
<checkbox id="zenLooksAndFeelShowLegacyToolbar"
data-l10n-id="zen-look-and-feel-legacy-toolbar"
preference="zen.themes.tabs.legacy-location"/>
</groupbox> </groupbox>
<hbox id="zenSidePanelsCategory" <hbox id="zenSidePanelsCategory"

View File

@@ -1,3 +1,4 @@
<script src="chrome://browser/content/zen-components/ZenThemesCommon.mjs" defer=""/>
<html:template id="template-paneZenMarketplace"> <html:template id="template-paneZenMarketplace">
<hbox id="ZenMarketplaceCategory" <hbox id="ZenMarketplaceCategory"
class="subcategory" class="subcategory"

View File

@@ -27,6 +27,9 @@
<checkbox id="zenWorkspacesAllowPinnedTabsForDifferentWorkspaces" <checkbox id="zenWorkspacesAllowPinnedTabsForDifferentWorkspaces"
data-l10n-id="zen-settings-workspaces-allow-pinned-tabs-for-different-workspaces" data-l10n-id="zen-settings-workspaces-allow-pinned-tabs-for-different-workspaces"
preference="zen.workspaces.individual-pinned-tabs"/> preference="zen.workspaces.individual-pinned-tabs"/>
<checkbox id="zenWorkspacesDisplayAsIconStrip"
data-l10n-id="zen-settings-workspaces-display-as-icon-strip"
preference="zen.workspaces.show-icon-strip"/>
</vbox> </vbox>
</groupbox> </groupbox>

View File

@@ -1,8 +1,8 @@
diff --git a/browser/components/sidebar/browser-sidebar.js b/browser/components/sidebar/browser-sidebar.js diff --git a/browser/components/sidebar/browser-sidebar.js b/browser/components/sidebar/browser-sidebar.js
index d05d561b6d01b11a36c762fc39dc13e14181bce7..b3aaf776c1fdeb1c02f88f2e8d5f424215b2cc26 100644 index 8b4f22ebc13fd013b82e9544dabcbe53d4429c13..22d21bcb825d35648213945bd4275d37b5c10a11 100644
--- a/browser/components/sidebar/browser-sidebar.js --- a/browser/components/sidebar/browser-sidebar.js
+++ b/browser/components/sidebar/browser-sidebar.js +++ b/browser/components/sidebar/browser-sidebar.js
@@ -446,7 +446,7 @@ var SidebarController = { @@ -473,7 +473,7 @@ var SidebarController = {
*/ */
setPosition() { setPosition() {
// First reset all ordinals to match DOM ordering. // First reset all ordinals to match DOM ordering.
@@ -11,7 +11,7 @@ index d05d561b6d01b11a36c762fc39dc13e14181bce7..b3aaf776c1fdeb1c02f88f2e8d5f4242
[...browser.children].forEach((node, i) => { [...browser.children].forEach((node, i) => {
node.style.order = i + 1; node.style.order = i + 1;
}); });
@@ -460,9 +460,11 @@ var SidebarController = { @@ -487,9 +487,11 @@ var SidebarController = {
let boxOrdinal = this._box.style.order; let boxOrdinal = this._box.style.order;
this._box.style.order = appcontent.style.order; this._box.style.order = appcontent.style.order;
@@ -25,11 +25,11 @@ index d05d561b6d01b11a36c762fc39dc13e14181bce7..b3aaf776c1fdeb1c02f88f2e8d5f4242
// Indicate we've switched ordering to the box // Indicate we've switched ordering to the box
this._box.setAttribute("positionend", true); this._box.setAttribute("positionend", true);
sidebarMain.setAttribute("positionend", true); sidebarMain.setAttribute("positionend", true);
@@ -471,6 +473,8 @@ var SidebarController = { @@ -498,6 +500,8 @@ var SidebarController = {
this._box.removeAttribute("positionend"); this._box.removeAttribute("positionend");
sidebarMain.removeAttribute("positionend"); sidebarMain.removeAttribute("positionend");
sidebarContainer.removeAttribute("positionend"); sidebarContainer.removeAttribute("positionend");
+ this._box.style.order = 0; + this._box.style.order = 1;
+ this._splitter.style.removeProperty("margin-right"); + this._splitter.style.removeProperty("margin-right");
} }

View File

@@ -1,8 +1,8 @@
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
index ef857bd81f2cd7c163ecc74ac1cf81a0b63ce838..7774dbf9f963529570b08465d107df236fcefae7 100644 index ef857bd81f2cd7c163ecc74ac1cf81a0b63ce838..c776348e776c1f9efc9b9f2ca479b1050f0a750b 100644
--- a/browser/components/tabbrowser/content/tabbrowser.js --- a/browser/components/tabbrowser/content/tabbrowser.js
+++ b/browser/components/tabbrowser/content/tabbrowser.js +++ b/browser/components/tabbrowser/content/tabbrowser.js
@@ -453,10 +453,13 @@ @@ -453,10 +453,12 @@
}, },
get _numPinnedTabs() { get _numPinnedTabs() {
@@ -13,12 +13,11 @@ index ef857bd81f2cd7c163ecc74ac1cf81a0b63ce838..7774dbf9f963529570b08465d107df23
+ if (!tab.pinned) { + if (!tab.pinned) {
break; break;
} }
+ if (tab.hidden) continue;
+ i++; + i++;
} }
return i; return i;
}, },
@@ -2704,6 +2707,11 @@ @@ -2704,6 +2706,11 @@
); );
} }
@@ -30,7 +29,7 @@ index ef857bd81f2cd7c163ecc74ac1cf81a0b63ce838..7774dbf9f963529570b08465d107df23
if (!UserInteraction.running("browser.tabs.opening", window)) { if (!UserInteraction.running("browser.tabs.opening", window)) {
UserInteraction.start("browser.tabs.opening", "initting", window); UserInteraction.start("browser.tabs.opening", "initting", window);
} }
@@ -2771,6 +2779,9 @@ @@ -2771,6 +2778,9 @@
noInitialLabel, noInitialLabel,
skipBackgroundNotify, skipBackgroundNotify,
}); });
@@ -40,7 +39,7 @@ index ef857bd81f2cd7c163ecc74ac1cf81a0b63ce838..7774dbf9f963529570b08465d107df23
if (insertTab) { if (insertTab) {
// insert the tab into the tab container in the correct position // insert the tab into the tab container in the correct position
this._insertTabAtIndex(t, { this._insertTabAtIndex(t, {
@@ -3248,6 +3259,14 @@ @@ -3248,6 +3258,14 @@
) { ) {
tabWasReused = true; tabWasReused = true;
tab = this.selectedTab; tab = this.selectedTab;
@@ -55,7 +54,7 @@ index ef857bd81f2cd7c163ecc74ac1cf81a0b63ce838..7774dbf9f963529570b08465d107df23
if (!tabData.pinned) { if (!tabData.pinned) {
this.unpinTab(tab); this.unpinTab(tab);
} else { } else {
@@ -3297,6 +3316,13 @@ @@ -3297,6 +3315,13 @@
preferredRemoteType, preferredRemoteType,
}); });
@@ -69,7 +68,7 @@ index ef857bd81f2cd7c163ecc74ac1cf81a0b63ce838..7774dbf9f963529570b08465d107df23
if (select) { if (select) {
tabToSelect = tab; tabToSelect = tab;
} }
@@ -4184,6 +4210,7 @@ @@ -4184,6 +4209,7 @@
isLastTab || isLastTab ||
aTab.pinned || aTab.pinned ||
aTab.hidden || aTab.hidden ||
@@ -77,7 +76,7 @@ index ef857bd81f2cd7c163ecc74ac1cf81a0b63ce838..7774dbf9f963529570b08465d107df23
this._removingTabs.size > this._removingTabs.size >
3 /* don't want lots of concurrent animations */ || 3 /* don't want lots of concurrent animations */ ||
!aTab.hasAttribute( !aTab.hasAttribute(
@@ -5117,10 +5144,10 @@ @@ -5117,10 +5143,10 @@
SessionStore.deleteCustomTabValue(aTab, "hiddenBy"); SessionStore.deleteCustomTabValue(aTab, "hiddenBy");
}, },

View File

@@ -1,8 +1,8 @@
diff --git a/browser/themes/BuiltInThemeConfig.sys.mjs b/browser/themes/BuiltInThemeConfig.sys.mjs diff --git a/browser/themes/BuiltInThemeConfig.sys.mjs b/browser/themes/BuiltInThemeConfig.sys.mjs
index 7cfea4b705a1338b1eb5c4f255808aeac4bdb819..9a2d2e096db483f5b93fd39886bee5dda38ce9c4 100644 index 7cfea4b705a1338b1eb5c4f255808aeac4bdb819..cf7dc720a3bd2b14535d57262ad2297f9478eddc 100644
--- a/browser/themes/BuiltInThemeConfig.sys.mjs --- a/browser/themes/BuiltInThemeConfig.sys.mjs
+++ b/browser/themes/BuiltInThemeConfig.sys.mjs +++ b/browser/themes/BuiltInThemeConfig.sys.mjs
@@ -22,22 +22,29 @@ export const BuiltInThemeConfig = new Map([ @@ -22,24 +22,17 @@ export const BuiltInThemeConfig = new Map([
[ [
"firefox-compact-light@mozilla.org", "firefox-compact-light@mozilla.org",
{ {
@@ -19,21 +19,13 @@ index 7cfea4b705a1338b1eb5c4f255808aeac4bdb819..9a2d2e096db483f5b93fd39886bee5dd
path: "resource://builtin-themes/dark/", path: "resource://builtin-themes/dark/",
}, },
], ],
[ - [
- "firefox-alpenglow@mozilla.org", - "firefox-alpenglow@mozilla.org",
+ "firefox-compact-galaxy@mozilla.org", - {
{
- version: "1.4", - version: "1.4",
- path: "resource://builtin-themes/alpenglow/", - path: "resource://builtin-themes/alpenglow/",
+ version: "1.3", - },
+ path: "resource://builtin-themes/galaxy/", - ],
+ },
+ ],
+ [
+ "firefox-compact-dream@mozilla.org",
+ {
+ version: "1.3",
+ path: "resource://builtin-themes/dream/",
},
],
[ [
"2022red-colorway@mozilla.org",
{

View File

@@ -1,6 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* Proton Light theme */
@import url('chrome://browser/skin/light-dark-overrides.css');

View File

@@ -1,12 +0,0 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<svg width="63" height="62" viewBox="0 0 63 62" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="31.5" cy="31" r="31" fill="url(#paint0_linear)"/>
<defs>
<linearGradient id="paint0_linear" x1="11.4829" y1="51" x2="43.4829" y2="19" gradientUnits="userSpaceOnUse">
<stop stop-color="#F0F0F4"/>
<stop offset="1" stop-color="#F9F9FB"/>
</linearGradient>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 614 B

View File

@@ -1,101 +0,0 @@
{
"manifest_version": 2,
"browser_specific_settings": {
"gecko": {
"id": "firefox-compact-dream@mozilla.org"
}
},
"name": "Zen Dream",
"description": "A theme with a light color scheme and a dream-y vibe.",
"author": "Zen",
"version": "1.3",
"icons": { "32": "icon.svg" },
"theme": {
"colors": {
"tab_background_text": "rgb(21,20,26)",
"tab_selected": "#fff",
"tab_text": "rgb(21,20,26)",
"icons": "rgb(91,91,102)",
"frame": "rgb(240, 240, 244)",
"frame_inactive": "rgb(235, 235, 239)",
"popup": "#fff",
"popup_text": "rgb(21,20,26)",
"popup_border": "rgb(240,240,244)",
"popup_highlight": "#e0e0e6",
"popup_highlight_text": "#15141a",
"tab_line": "transparent",
"toolbar": "#f9f9fb",
"toolbar_top_separator": "transparent",
"toolbar_bottom_separator": "#ccc",
"toolbar_field": "rgb(240, 240, 244)",
"toolbar_field_text": "rgb(21, 20, 26)",
"toolbar_field_border": "transparent",
"toolbar_field_focus": "white",
"toolbar_text": "rgb(21,20,26)",
"ntp_background": "#F9F9FB",
"ntp_text": "rgb(21, 20, 26)",
"popup_action_color": "rgb(91,91,102)",
"button": "rgba(207,207,216,.33)",
"button_hover": "rgba(207,207,216,.66)",
"button_active": "rgb(207,207,216)",
"button_primary": "#000",
"button_primary_hover": "rgb(31, 31, 31)",
"button_primary_active": "rgb(207,207,216)",
"button_primary_color": "#fff",
"input_color": "rgb(21,20,26)",
"input_background": "#f0f0f4",
"urlbar_popup_hover": "rgb(240,240,244)",
"urlbar_popup_separator": "rgb(240,240,244)",
"appmenu_update_icon_color": "#2AC3A2",
"appmenu_info_icon_color": "#0090ED",
"tab_icon_overlay_stroke": "rgb(255,255,255)",
"tab_icon_overlay_fill": "rgb(91,91,102)"
},
"properties": {
"color_scheme": "light",
"panel_hover": "color-mix(in srgb, currentColor 12%, transparent)",
"panel_active": "color-mix(in srgb, currentColor 20%, transparent)",
"panel_active_darker": "color-mix(in srgb, currentColor 27%, transparent)",
"toolbar_field_icon_opacity": "0.72",
"input_border_color": "rgba(0, 0, 0, .3)",
"zap_gradient": "linear-gradient(90deg, #9059FF 0%, #FF4AA2 52.08%, #FFBD4F 100%)",
"zen_main_browser_background": "radial-gradient(ellipse, var(--zen-browser-gradient-base, #1B1E27) 20%, rgb(255, 255, 255) 100%)"
}
},
"theme_experiment": {
"stylesheet": "experiment.css",
"colors": {
"popup_action_color": "--urlbarView-action-color",
"button": "--button-bgcolor",
"button_hover": "--button-hover-bgcolor",
"button_active": "--button-active-bgcolor",
"button_primary": "--button-primary-bgcolor",
"button_primary_hover": "--button-primary-hover-bgcolor",
"button_primary_active": "--button-primary-active-bgcolor",
"button_primary_color": "--button-primary-color",
"input_background": "--input-bgcolor",
"input_color": "--input-color",
"input_border": "--input-border-color",
"urlbar_popup_hover": "--urlbarView-hover-background",
"urlbar_popup_separator": "--urlbarView-separator-color",
"appmenu_update_icon_color": "--panel-banner-item-update-supported-bgcolor",
"appmenu_info_icon_color": "--panel-banner-item-info-icon-bgcolor",
"tab_icon_overlay_stroke": "--tab-icon-overlay-stroke",
"tab_icon_overlay_fill": "--tab-icon-overlay-fill"
},
"properties": {
"panel_hover": "--panel-item-hover-bgcolor",
"panel_active": "--arrowpanel-dimmed-further",
"panel_active_darker": "--panel-item-active-bgcolor",
"toolbar_field_icon_opacity": "--urlbar-icon-fill-opacity",
"input_border_color": "--input-border-color",
"zap_gradient": "--panel-separator-zap-gradient",
"zen_main_browser_background": "--zen-main-browser-background"
}
}
}

View File

@@ -1,36 +0,0 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<svg width="680" height="92" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="680" height="92" fill="#F0F0F4" />
<g filter="url(#filter0_dd)">
<rect x="28" y="5" width="166" height="34" rx="4" fill="white" />
</g>
<rect x="51" y="20" width="121" height="4" rx="2" fill="#15141A" />
<rect x="221" y="20" width="121" height="4" rx="2" fill="#15141A" />
<rect y="44" width="680" height="48" fill="#F9F9FB" />
<circle cx="24" cy="68" r="6.25" stroke="#5B5B66" stroke-width="1.5" />
<circle cx="60" cy="68" r="6.25" stroke="#5B5B66" stroke-width="1.5" />
<line x1="663" y1="73.75" x2="649" y2="73.75" stroke="#5B5B66" stroke-width="1.5" />
<line x1="663" y1="67.75" x2="649" y2="67.75" stroke="#5B5B66" stroke-width="1.5" />
<line x1="663" y1="61.75" x2="649" y2="61.75" stroke="#5B5B66" stroke-width="1.5" />
<rect x="114" y="52" width="488" height="32" rx="4" fill="#F0F0F4" />
<circle cx="130" cy="68" r="6.25" stroke="#5B5B66" stroke-width="1.5" />
<rect x="146" y="66" width="308" height="4" rx="2" fill="#5B5B66" />
<defs>
<filter id="filter0_dd" x="24" y="1" width="174" height="42" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix" />
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" />
<feOffset />
<feGaussianBlur stdDeviation="2" />
<feColorMatrix type="matrix" values="0 0 0 0 0.501961 0 0 0 0 0.501961 0 0 0 0 0.556863 0 0 0 0.5 0" />
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow" />
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" />
<feOffset />
<feGaussianBlur stdDeviation="0.5" />
<feColorMatrix type="matrix" values="0 0 0 0 0.501961 0 0 0 0 0.501961 0 0 0 0 0.556863 0 0 0 0.9 0" />
<feBlend mode="normal" in2="effect1_dropShadow" result="effect2_dropShadow" />
<feBlend mode="normal" in="SourceGraphic" in2="effect2_dropShadow" result="shape" />
</filter>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -1,6 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* Proton Dark theme */
@import url('chrome://browser/skin/light-dark-overrides.css');

View File

@@ -1,12 +0,0 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<svg width="63" height="62" viewBox="0 0 63 62" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="31.5" cy="31" r="31" fill="url(#paint0_linear)"/>
<defs>
<linearGradient id="paint0_linear" x1="44.4829" y1="19" x2="10.4829" y2="53" gradientUnits="userSpaceOnUse">
<stop stop-color="#42414D"/>
<stop offset="1" stop-color="#1C1B22"/>
</linearGradient>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 614 B

View File

@@ -1,95 +0,0 @@
{
"manifest_version": 2,
"browser_specific_settings": {
"gecko": {
"id": "firefox-compact-galaxy@mozilla.org"
}
},
"name": "Zen Galaxy",
"description": "A theme with a dark color scheme and galaxy effects.",
"author": "Zen",
"version": "1.3",
"icons": { "32": "icon.svg" },
"theme": {
"colors": {
"tab_background_text": "#fbfbfe",
"tab_selected": "rgb(66,65,77)",
"tab_text": "rgb(251,251,254)",
"icons": "rgb(251,251,254)",
"frame": "rgb(28, 27, 34)",
"frame_inactive": "rgb(31, 30, 37)",
"popup": "rgb(66,65,77)",
"popup_text": "rgb(251,251,254)",
"popup_border": "rgb(82,82,94)",
"popup_highlight": "rgb(43,42,51)",
"tab_line": "transparent",
"toolbar": "rgb(43,42,51)",
"toolbar_top_separator": "transparent",
"toolbar_bottom_separator": "hsl(240, 5%, 5%)",
"toolbar_field": "rgb(28,27,34)",
"toolbar_field_border": "transparent",
"toolbar_field_text": "rgb(251,251,254)",
"toolbar_field_focus": "rgb(66,65,77)",
"toolbar_text": "rgb(251, 251, 254)",
"ntp_background": "rgb(43, 42, 51)",
"ntp_card_background": "rgb(66,65,77)",
"ntp_text": "rgb(251, 251, 254)",
"sidebar_text": "rgb(249, 249, 250)",
"sidebar_border": "rgba(255, 255, 255, 0.1)",
"button": "rgba(0, 0, 0, .33)",
"button_hover": "rgba(207, 207, 216, .20)",
"button_active": "rgba(207, 207, 216, .40)",
"button_primary": "#fff",
"button_primary_hover": "rgb(207, 207, 216)",
"button_primary_active": "rgb(207, 207, 216)",
"button_primary_color": "#000",
"input_background": "#42414D",
"input_color": "rgb(251,251,254)",
"input_border": "#fff",
"urlbar_popup_separator": "rgb(82,82,94)",
"appmenu_update_icon_color": "#54FFBD",
"appmenu_info_icon_color": "#80EBFF",
"tab_icon_overlay_stroke": "rgb(66,65,77)",
"tab_icon_overlay_fill": "rgb(251,251,254)"
},
"properties": {
"color_scheme": "dark",
"panel_active": "color-mix(in srgb, currentColor 14%, transparent)",
"toolbar_field_icon_opacity": "1",
"zap_gradient": "linear-gradient(90deg, #9059FF 0%, #FF4AA2 52.08%, #FFBD4F 100%)",
"zen_main_browser_background": "radial-gradient(ellipse, var(--zen-browser-gradient-base, #1B1E27) 20%, #1b1b1b 100%)"
}
},
"theme_experiment": {
"stylesheet": "experiment.css",
"colors": {
"button": "--button-bgcolor",
"button_hover": "--button-hover-bgcolor",
"button_active": "--button-active-bgcolor",
"button_primary": "--button-primary-bgcolor",
"button_primary_hover": "--button-primary-hover-bgcolor",
"button_primary_active": "--button-primary-active-bgcolor",
"button_primary_color": "--button-primary-color",
"input_background": "--input-bgcolor",
"input_color": "--input-color",
"input_border": "--input-border-color",
"urlbar_popup_separator": "--urlbarView-separator-color",
"zoom_controls": "--zoom-controls-bgcolor",
"appmenu_update_icon_color": "--panel-banner-item-update-supported-bgcolor",
"appmenu_info_icon_color": "--panel-banner-item-info-icon-bgcolor",
"tab_icon_overlay_stroke": "--tab-icon-overlay-stroke",
"tab_icon_overlay_fill": "--tab-icon-overlay-fill"
},
"properties": {
"panel_active": "--arrowpanel-dimmed-further",
"toolbar_field_icon_opacity": "--urlbar-icon-fill-opacity",
"zap_gradient": "--panel-separator-zap-gradient",
"zen_main_browser_background": "--zen-main-browser-background"
}
}
}

View File

@@ -1,18 +0,0 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<svg width="680" height="92" viewBox="0 0 680 92" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="680" height="92" fill="#1C1B22" />
<rect x="28" y="5" width="166" height="34" rx="4" fill="#42414D" />
<rect x="51" y="20" width="121" height="4" rx="2" fill="#FBFBFE" />
<rect x="221" y="20" width="121" height="4" rx="2" fill="#B8B7BB" />
<rect y="44" width="680" height="48" fill="#2B2A33" />
<circle cx="24" cy="68" r="6.25" stroke="#FBFBFE" stroke-width="1.5" />
<circle cx="60" cy="68" r="6.25" stroke="#FBFBFE" stroke-width="1.5" />
<line x1="663" y1="73.75" x2="649" y2="73.75" stroke="#FBFBFE" stroke-width="1.5" />
<line x1="663" y1="67.75" x2="649" y2="67.75" stroke="#FBFBFE" stroke-width="1.5" />
<line x1="663" y1="61.75" x2="649" y2="61.75" stroke="#FBFBFE" stroke-width="1.5" />
<rect x="114" y="52" width="488" height="32" rx="4" fill="#1C1B22" />
<circle cx="130" cy="68" r="6.25" stroke="white" stroke-width="1.5" />
<rect x="146" y="66" width="308" height="4" rx="2" fill="white" />
</svg>

Before

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -1,8 +1 @@
content/builtin-themes/galaxy (galaxy/*.svg)
content/builtin-themes/galaxy (galaxy/*.css)
content/builtin-themes/galaxy/manifest.json (galaxy/manifest.json)
content/builtin-themes/dream (dream/*.svg)
content/builtin-themes/dream (dream/*.css)
content/builtin-themes/dream/manifest.json (dream/manifest.json)

View File

@@ -179,7 +179,8 @@ groupbox h2 {
margin-bottom: 15px; margin-bottom: 15px;
} }
#zen-dark-theme-styles-form { #zen-dark-theme-styles-form,
#zen-compact-mode-styles-form {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
gap: var(--space-large); gap: var(--space-large);
@@ -234,6 +235,43 @@ groupbox h2 {
border-color: var(--zen-primary-color); border-color: var(--zen-primary-color);
} }
.zen-compact-mode-styles-browser-wrapper {
width: 55%;
height: 60px;
display: flex;
border-radius: 10px;
border: 1px solid var(--zen-colors-border);
background: var(--zen-colors-tertiary);
position: relative;
box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.1);
padding: 7px;
&[left] div {
width: 100%;
background: var(--zen-primary-color);
border-radius: 5px;
height: 18px;
box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.1);
}
&[top] div {
width: 18px;
background: var(--zen-primary-color);
border-radius: 5px;
height: 100%;
box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.1);
}
&[both] div {
width: 100%;
height: 100%;
background: var(--zen-colors-secondary);
border-radius: 5px;
box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.1);
}
}
.zenLooksAndFeelColorOption { .zenLooksAndFeelColorOption {
width: 60px; width: 60px;
height: 60px; height: 60px;
@@ -315,7 +353,7 @@ groupbox h2 {
border-color: red; border-color: red;
} }
#zenCKSOptions-wrapper > [data-group]:not(:first-of-type) { #zenCKSOption-wrapper > [data-group]:not(:first-of-type) {
border-top: 1px solid light-dark(rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.1)); border-top: 1px solid light-dark(rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.1));
padding-top: 10px; padding-top: 10px;
} }
@@ -480,6 +518,10 @@ groupbox h2 {
flex-direction: row; flex-direction: row;
} }
.zenThemeMarketplaceItemPreferenceToggle {
align-self: start;
}
#zenThemeMarketplaceItemContentHeader { #zenThemeMarketplaceItemContentHeader {
display: flex; display: flex;
flex-direction: row; flex-direction: row;

View File

@@ -19,8 +19,8 @@
list-style-image: url('back.svg') !important; list-style-image: url('back.svg') !important;
} }
:root[zen-sidebar-legacy='true'] #forward-button, #forward-button,
:root[zen-sidebar-legacy='true'] #zen-sidebar-web-panel-forward { #zen-sidebar-web-panel-forward {
list-style-image: url('forward.svg') !important; list-style-image: url('forward.svg') !important;
@media (max-width: 650px) { @media (max-width: 650px) {
@@ -28,17 +28,8 @@
} }
} }
:root:not([zen-sidebar-legacy='true']) #forward-button, #reload-button,
:root:not([zen-sidebar-legacy='true']) #zen-sidebar-web-panel-forward { #zen-sidebar-web-panel-reload {
list-style-image: url('forward.svg') !important;
@media (max-width: 650px) {
display: none;
}
}
:root[zen-sidebar-legacy='true'] #reload-button,
:root[zen-sidebar-legacy='true'] #zen-sidebar-web-panel-reload {
list-style-image: url('reload.svg') !important; list-style-image: url('reload.svg') !important;
@media (max-width: 650px) { @media (max-width: 650px) {
@@ -46,15 +37,6 @@
} }
} }
:root:not([zen-sidebar-legacy='true']) #reload-button,
:root:not([zen-sidebar-legacy='true']) #zen-sidebar-web-panel-reload {
list-style-image: url('reload.svg') !important;
@media (max-width: 700px) {
display: none;
}
}
#stop-button, #stop-button,
.close-icon, .close-icon,
#zen-sidebar-web-panel-close { #zen-sidebar-web-panel-close {
@@ -191,7 +173,7 @@
#zoom-in-button, #zoom-in-button,
#tabs-newtab-button, #tabs-newtab-button,
#TabsToolbar #new-tab-button, #new-tab-button,
#appMenu-zoomEnlarge-button2, #appMenu-zoomEnlarge-button2,
#PanelUI-zen-profiles-newProfile, #PanelUI-zen-profiles-newProfile,
#zen-sidebar-add-panel-button, #zen-sidebar-add-panel-button,
@@ -598,9 +580,6 @@
} }
/* Context Menu Icons */ /* Context Menu Icons */
menupopup > menuitem:is([checked='true'], [selected='true']) .menu-iconic-icon {
list-style-image: url('checkmark.svg') !important;
}
#context-video-pictureinpicture:not([checked='true']) .menu-iconic-icon { #context-video-pictureinpicture:not([checked='true']) .menu-iconic-icon {
list-style-image: url('media-pip.svg') !important; list-style-image: url('media-pip.svg') !important;
@@ -910,6 +889,10 @@ menuitem[contexttype='fullscreen'][label*='Exit'] {
--menu-image: url('duplicate-tab.svg'); --menu-image: url('duplicate-tab.svg');
} }
#zen-context-menu-compact-mode {
--menu-image: url('sidebars.svg');
}
#context_bookmarkTab, #context_bookmarkTab,
#context_bookmarkSelectedTabs, #context_bookmarkSelectedTabs,
#toggle_PersonalToolbar, #toggle_PersonalToolbar,
@@ -1081,3 +1064,10 @@ menuitem[id='placesContext_new:separator'] {
var(--fp-contextmenu-menuitem-padding-inline) + 16px + var(--fp-contextmenu-menuicon-margin-inline) var(--fp-contextmenu-menuitem-padding-inline) + 16px + var(--fp-contextmenu-menuicon-margin-inline)
) !important; ) !important;
} }
menupopup > menuitem:is([type='checkbox']) .menu-iconic-left {
--menu-image: none !important;
margin-inline-start: 4px;
margin-inline-end: 0;
padding-inline-end: 0;
}

View File

@@ -0,0 +1,13 @@
diff --git a/dom/events/KeyEventHandler.cpp b/dom/events/KeyEventHandler.cpp
index 3f3ca808e8..0828b37f51 100644
--- a/dom/events/KeyEventHandler.cpp
+++ b/dom/events/KeyEventHandler.cpp
@@ -641,7 +641,7 @@ void KeyEventHandler::BuildModifiers(nsAString& aModifiers) {
} else if (strcmp(token, "control") == 0) {
mKeyMask |= cControl | cControlMask;
} else if (strcmp(token, "accel") == 0) {
- mKeyMask |= AccelKeyMask();
+ mKeyMask |= cControl | cControlMask;
} else if (strcmp(token, "access") == 0) {
mKeyMask |= KeyToMask(LookAndFeel::GetMenuAccessKey());
} else if (strcmp(token, "any") == 0) {

View File

@@ -0,0 +1,13 @@
diff --git a/toolkit/modules/UpdateUtils.sys.mjs b/toolkit/modules/UpdateUtils.sys.mjs
index be9ce9d5402c30bf4a9712f1ce9026503c191a53..230882363b3e1bbe7f0977567db61f72494a19ea 100644
--- a/toolkit/modules/UpdateUtils.sys.mjs
+++ b/toolkit/modules/UpdateUtils.sys.mjs
@@ -81,7 +81,7 @@ export var UpdateUtils = {
replacement = Services.appinfo.name;
break;
case "VERSION":
- replacement = Services.appinfo.version;
+ replacement = AppConstants.ZEN_FIREFOX_VERSION;
break;
case "BUILD_ID":
replacement = Services.appinfo.appBuildID;

View File

@@ -1,8 +1,8 @@
diff --git a/toolkit/mozapps/extensions/internal/XPIDatabase.sys.mjs b/toolkit/mozapps/extensions/internal/XPIDatabase.sys.mjs diff --git a/toolkit/mozapps/extensions/internal/XPIDatabase.sys.mjs b/toolkit/mozapps/extensions/internal/XPIDatabase.sys.mjs
index 0e02963b7e2f44e7669a34ded9f0f0636e36e66c..03e203b4eb0c9436ff9767756bfe8e64dd49096e 100644 index 17219a88b42b0954f7bd7f7ea7ae8dcad55cc77c..e59373c2cac68fb3075e32143bb8940749c20a8a 100644
--- a/toolkit/mozapps/extensions/internal/XPIDatabase.sys.mjs --- a/toolkit/mozapps/extensions/internal/XPIDatabase.sys.mjs
+++ b/toolkit/mozapps/extensions/internal/XPIDatabase.sys.mjs +++ b/toolkit/mozapps/extensions/internal/XPIDatabase.sys.mjs
@@ -137,7 +137,7 @@ const KEY_APP_GLOBAL = "app-global"; @@ -138,7 +138,7 @@ const KEY_APP_GLOBAL = "app-global";
const KEY_APP_PROFILE = "app-profile"; const KEY_APP_PROFILE = "app-profile";
const KEY_APP_TEMPORARY = "app-temporary"; const KEY_APP_TEMPORARY = "app-temporary";
@@ -11,12 +11,3 @@ index 0e02963b7e2f44e7669a34ded9f0f0636e36e66c..03e203b4eb0c9436ff9767756bfe8e64
// Properties to cache and reload when an addon installation is pending // Properties to cache and reload when an addon installation is pending
const PENDING_INSTALL_METADATA = [ const PENDING_INSTALL_METADATA = [
@@ -214,7 +214,7 @@ const SIGNED_TYPES = new Set(["extension", "locale", "theme"]);
// Time to wait before async save of XPI JSON database, in milliseconds
const ASYNC_SAVE_DELAY_MS = 20;
-const l10n = new Localization(["browser/appExtensionFields.ftl"], true);
+const l10n = new Localization(["browser/appExtensionFields.ftl", "browser/zenAppExtensionFields.ftl"], true);
/**
* Schedules an idle task, and returns a promise which resolves to an

View File

@@ -5,7 +5,7 @@
"binaryName": "zen", "binaryName": "zen",
"version": { "version": {
"product": "firefox", "product": "firefox",
"version": "130.0" "version": "130.0.1"
}, },
"buildOptions": { "buildOptions": {
"generateBranding": true "generateBranding": true
@@ -18,7 +18,7 @@
"brandShortName": "Zen Browser", "brandShortName": "Zen Browser",
"brandFullName": "Zen Browser", "brandFullName": "Zen Browser",
"release": { "release": {
"displayVersion": "1.0.1-a", "displayVersion": "1.0.1-a.3",
"github": { "github": {
"repo": "zen-browser/desktop" "repo": "zen-browser/desktop"
}, },