Compare commits
46 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
07a9aabe20 | ||
|
|
4702b8ffed | ||
|
|
b071c7ff11 | ||
|
|
9d8b8458bf | ||
|
|
73bc2382bb | ||
|
|
4a4c8a7b2b | ||
|
|
0a9f88a2fb | ||
|
|
8bed8e2cf7 | ||
|
|
c8b396b99d | ||
|
|
afc636a20f | ||
|
|
bd0b012bce | ||
|
|
86b0a9dac2 | ||
|
|
f344c0d41d | ||
|
|
f70c599afd | ||
|
|
08cf77eb23 | ||
|
|
25910c5189 | ||
|
|
09d17f2cfe | ||
|
|
c9cf757964 | ||
|
|
98b64e2fad | ||
|
|
fbfab42e8b | ||
|
|
c44c63d5ce | ||
|
|
1e3b1a6605 | ||
|
|
ef2a2a5efc | ||
|
|
ccfe709789 | ||
|
|
43563ccff7 | ||
|
|
db2673cf27 | ||
|
|
351cc884ec | ||
|
|
d6823beb95 | ||
|
|
dfede695a7 | ||
|
|
b0354fa8b9 | ||
|
|
41cecd4947 | ||
|
|
dd5a59a1cb | ||
|
|
ee86bff81c | ||
|
|
9fb04e4f7c | ||
|
|
74a4efddf1 | ||
|
|
10906f91f5 | ||
|
|
816d6887ad | ||
|
|
e950e012ed | ||
|
|
4fdd0993d7 | ||
|
|
8e783f948f | ||
|
|
e6313c4d5f | ||
|
|
7de3843cd9 | ||
|
|
425d334f8b | ||
|
|
609854c28d | ||
|
|
fd09bd2092 | ||
|
|
1aa00bfa2a |
@@ -1,119 +1,136 @@
|
||||
param(
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string][Parameter(Mandatory=$true)]$SignIdentity,
|
||||
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string][Parameter(Mandatory=$true)]$GithubRunId
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
function Download-Artifacts {
|
||||
param(
|
||||
[string]$Name,
|
||||
[string]$GithubRunId
|
||||
)
|
||||
gh run download $GithubRunId --name $Name -D (Join-Path $PWD 'windsign-temp\windows-x64-obj-' + $Name)
|
||||
Write-Verbose "Downloaded $Name artifacts"
|
||||
}
|
||||
|
||||
function Sign-Files {
|
||||
param(
|
||||
[string]$Path
|
||||
)
|
||||
$files = Get-ChildItem -Path $Path -Recurse -Include *.exe, *.dll
|
||||
signtool.exe sign /n "$SignIdentity" /t http://time.certum.pl/ /fd sha256 /v $files
|
||||
}
|
||||
|
||||
function Move-File {
|
||||
param(
|
||||
[string]$Source,
|
||||
[string]$Destination
|
||||
)
|
||||
if (Test-Path $Source) {
|
||||
Move-Item $Source -Destination $Destination -Force
|
||||
Write-Verbose "Moved $Source to $Destination"
|
||||
} else {
|
||||
Write-Warning "Source file $Source does not exist."
|
||||
}
|
||||
}
|
||||
|
||||
function Create-Tar {
|
||||
param(
|
||||
[string]$Name
|
||||
)
|
||||
$tarPath = Join-Path $PWD "windsign-temp\windows-x64-signed-$Name"
|
||||
Remove-Item -Path $tarPath -Recurse -ErrorAction SilentlyContinue
|
||||
New-Item -ItemType Directory -Path $tarPath | Out-Null
|
||||
|
||||
Move-File -Source ".\dist\output.mar" -Destination (Join-Path $tarPath ("windows-$Name.mar"))
|
||||
Move-File -Source ".\dist\zen.installer.exe" -Destination (Join-Path $tarPath ("zen.installer$($Name -eq 'arm64' ? '-arm64' : '') .exe"))
|
||||
Move-File -Source (Get-ChildItem ".\dist\*.en-US.win64$($Name -eq 'arm64' ? '-aarch64' : '') .zip" | Select-Object -First 1) -Destination (Join-Path $tarPath ("zen.win-$Name.zip"))
|
||||
}
|
||||
|
||||
function SignAndPackage {
|
||||
param(
|
||||
[string]$Name
|
||||
)
|
||||
|
||||
Write-Verbose "Executing on $Name"
|
||||
Remove-Item -Path ".\dist" -Recurse -ErrorAction SilentlyContinue
|
||||
Remove-Item -Path "engine\obj-x86_64-pc-windows-msvc\" -Recurse -ErrorAction SilentlyContinue
|
||||
Copy-Item -Path (Join-Path $PWD "windsign-temp\windows-x64-obj-$Name") -Destination "engine\obj-x86_64-pc-windows-msvc\" -Recurse
|
||||
Write-Verbose "Signing $Name"
|
||||
|
||||
Sign-Files -Path "engine\obj-x86_64-pc-windows-msvc\"
|
||||
|
||||
$env:SURFER_SIGNING_MODE = "sign"
|
||||
$env:MAR = (Join-Path $PWD "build\winsign\mar.exe")
|
||||
$env:SURFER_COMPAT = if ($Name -eq "arm64") { "aarch64" } else { "x86_64" }
|
||||
Write-Verbose "Compat Mode? $env:SURFER_COMPAT"
|
||||
|
||||
pnpm surfer package --verbose
|
||||
|
||||
Create-Tar -Name $Name
|
||||
|
||||
# Extract and sign the contents of the zip
|
||||
Expand-Archive -Path (Join-Path $tarPath ("zen.win-$Name.zip")) -DestinationPath (Join-Path $tarPath ("zen.win-$Name"))
|
||||
Remove-Item -Path (Join-Path $tarPath ("zen.win-$Name.zip")) -ErrorAction SilentlyContinue
|
||||
|
||||
Sign-Files -Path (Join-Path $tarPath ("zen.win-$Name"))
|
||||
Compress-Archive -Path (Join-Path $tarPath ("zen.win-$Name")) -DestinationPath (Join-Path $tarPath ("zen.win-$Name.zip"))
|
||||
Remove-Item -Path (Join-Path $tarPath ("zen.win-$Name")) -Recurse -ErrorAction SilentlyContinue
|
||||
|
||||
Move-File -Source ".\dist\update\*" -Destination (Join-Path $tarPath "update_manifest")
|
||||
|
||||
Write-Verbose "Finished $Name"
|
||||
}
|
||||
|
||||
Write-Verbose "Preparing environment"
|
||||
echo "Preparing environment"
|
||||
git pull --recurse-submodules
|
||||
New-Item -ItemType Directory -Path "windsign-temp" -ErrorAction SilentlyContinue
|
||||
mkdir windsign-temp -ErrorAction SilentlyContinue
|
||||
|
||||
Download-Artifacts -Name "windows-x64-obj-arm64" -GithubRunId $GithubRunId
|
||||
Download-Artifacts -Name "windows-x64-obj-x86_64" -GithubRunId $GithubRunId
|
||||
# Download in parallel
|
||||
|
||||
#show output too
|
||||
#Start-Job -Name "DownloadGitObjectsRepo" -ScriptBlock {
|
||||
# param($PWD)
|
||||
# echo "Downloading git objects repo to $PWD\windsign-temp\windows-binaries"
|
||||
# git clone https://github.com/zen-browser/windows-binaries.git $PWD\windsign-temp\windows-binaries
|
||||
# echo "Downloaded git objects repo to"
|
||||
#} -Verbose -ArgumentList $PWD -Debug
|
||||
|
||||
gh run download $GithubRunId --name windows-x64-obj-arm64 -D windsign-temp\windows-x64-obj-arm64
|
||||
echo "Downloaded arm64 artifacts"
|
||||
gh run download $GithubRunId --name windows-x64-obj-x86_64 -D windsign-temp\windows-x64-obj-x86_64
|
||||
echo "Downloaded x86_64 artifacts"
|
||||
|
||||
|
||||
#Wait-Job -Name "DownloadGitObjectsRepo"
|
||||
|
||||
mkdir engine\obj-x86_64-pc-windows-msvc\ -ErrorAction SilentlyContinue
|
||||
|
||||
New-Item -ItemType Directory -Path "engine\obj-x86_64-pc-windows-msvc" -ErrorAction SilentlyContinue
|
||||
pnpm surfer ci --brand release
|
||||
|
||||
SignAndPackage -Name "arm64"
|
||||
SignAndPackage -Name "x86_64"
|
||||
function SignAndPackage($name) {
|
||||
echo "Executing on $name"
|
||||
rmdir .\dist -Recurse -ErrorAction SilentlyContinue
|
||||
rmdir engine\obj-x86_64-pc-windows-msvc\ -Recurse -ErrorAction SilentlyContinue
|
||||
cp windsign-temp\windows-x64-obj-$name engine\obj-x86_64-pc-windows-msvc\ -Recurse
|
||||
echo "Signing $name"
|
||||
|
||||
Write-Verbose "All artifacts signed and packaged, ready for release!"
|
||||
Write-Verbose "Committing the changes to the repository"
|
||||
cd (Join-Path $PWD "windsign-temp\windows-binaries")
|
||||
# Collect all .exe and .dll files into a list
|
||||
$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
|
||||
|
||||
signtool.exe sign /n "$SignIdentity" /t http://time.certum.pl/ /fd sha256 /v $files
|
||||
echo "Packaging $name"
|
||||
$env:SURFER_SIGNING_MODE="sign"
|
||||
$env:MAR="$PWD\\build\\winsign\\mar.exe"
|
||||
if ($name -eq "arm64") {
|
||||
$env:SURFER_COMPAT="aarch64"
|
||||
} else {
|
||||
$env:SURFER_COMPAT="x86_64"
|
||||
}
|
||||
|
||||
echo "Compat Mode? $env:SURFER_COMPAT"
|
||||
pnpm surfer package --verbose
|
||||
|
||||
# In the release script, we do the following:
|
||||
# tar -xvf .github/workflows/object/windows-x64-signed-x86_64.tar.gz -C windows-x64-signed-x86_64
|
||||
# We need to create a tar with the same structure and no top-level directory
|
||||
# Inside, we need:
|
||||
# - update_manifest/*
|
||||
# - windows.mar
|
||||
# - zen.installer.exe
|
||||
# - zen.win-x86_64.zip
|
||||
echo "Creating tar for $name"
|
||||
rm .\windsign-temp\windows-x64-signed-$name -Recurse -ErrorAction SilentlyContinue
|
||||
mkdir windsign-temp\windows-x64-signed-$name
|
||||
|
||||
# Move the MAR, add the `-arm64` suffix if needed
|
||||
echo "Moving MAR for $name"
|
||||
if ($name -eq "arm64") {
|
||||
mv .\dist\output.mar windsign-temp\windows-x64-signed-$name\windows-$name.mar
|
||||
} else {
|
||||
mv .\dist\output.mar windsign-temp\windows-x64-signed-$name\windows.mar
|
||||
}
|
||||
|
||||
# Move the installer
|
||||
echo "Moving installer for $name"
|
||||
if ($name -eq "arm64") {
|
||||
mv .\dist\zen.installer.exe windsign-temp\windows-x64-signed-$name\zen.installer-$name.exe
|
||||
} else {
|
||||
mv .\dist\zen.installer.exe windsign-temp\windows-x64-signed-$name\zen.installer.exe
|
||||
}
|
||||
|
||||
# Move the zip
|
||||
echo "Moving zip for $name"
|
||||
if ($name -eq "arm64") {
|
||||
mv (Get-Item .\dist\*.en-US.win64-aarch64.zip) windsign-temp\windows-x64-signed-$name\zen.win-arm64.zip
|
||||
} else {
|
||||
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
|
||||
mv .\dist\update\. windsign-temp\windows-x64-signed-$name\update_manifest
|
||||
|
||||
echo "Invoking tar for $name"
|
||||
# note: We need to sign it into a parent folder, called windows-x64-signed-$name
|
||||
rmdir .\windsign-temp\windows-binaries\windows-x64-signed-$name -Recurse -ErrorAction SilentlyContinue
|
||||
mv windsign-temp\windows-x64-signed-$name .\windsign-temp\windows-binaries -Force
|
||||
|
||||
echo "Finished $name"
|
||||
}
|
||||
|
||||
SignAndPackage arm64
|
||||
SignAndPackage x86_64
|
||||
|
||||
echo "All artifacts signed and packaged, ready for release!"
|
||||
echo "Commiting the changes to the repository"
|
||||
cd windsign-temp\windows-binaries
|
||||
git add .
|
||||
git commit -m "Sign and package windows artifacts"
|
||||
git push
|
||||
cd -
|
||||
cd ..\..
|
||||
|
||||
# Cleaning up
|
||||
Write-Verbose "Cleaning up"
|
||||
Remove-Item -Path "windsign-temp\windows-x64-obj-x86_64" -Recurse -ErrorAction SilentlyContinue
|
||||
Remove-Item -Path "windsign-temp\windows-x64-obj-arm64" -Recurse -ErrorAction SilentlyContinue
|
||||
|
||||
Write-Verbose "Opening Visual Studio Code"
|
||||
echo "All done!"
|
||||
echo "All the artifacts (x86_64 and arm46) are signed and packaged, get a rest now!"
|
||||
Read-Host "Press Enter to continue"
|
||||
|
||||
echo "Cleaning up"
|
||||
rmdir windsign-temp\windows-x64-obj-x86_64 -Recurse -ErrorAction SilentlyContinue
|
||||
rmdir windsign-temp\windows-x64-obj-arm64 -Recurse -ErrorAction SilentlyContinue
|
||||
|
||||
echo "Opening visual studio code"
|
||||
code .
|
||||
Write-Host "All done! Press Enter to continue."
|
||||
Read-Host
|
||||
|
||||
|
||||
BIN
configs/branding/release/wizWatermark.bmp
Normal file
BIN
configs/branding/release/wizWatermark.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 201 KiB |
BIN
configs/branding/twilight/wizWatermark.bmp
Normal file
BIN
configs/branding/twilight/wizWatermark.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 201 KiB |
@@ -36,29 +36,29 @@ modules:
|
||||
- mv zen /app/
|
||||
- mkdir -p /app/lib/ffmpeg
|
||||
|
||||
- install -Dm0755 metadata/launch-script.sh ${FLATPAK_DEST}/bin/launch-script.sh
|
||||
- install -Dm0644 metadata/policies.json ${FLATPAK_DEST}/bin/distribution/policies.json
|
||||
- install -Dm0644 metadata/icons/${FLATPAK_ID}.svg ${FLATPAK_DEST}/share/icons/hicolor/scalable/apps/${FLATPAK_ID}.svg
|
||||
- install -Dm0644 metadata/${FLATPAK_ID}.metainfo.xml ${FLATPAK_DEST}/share/metainfo/${FLATPAK_ID}.metainfo.xml
|
||||
- install -Dm0644 metadata/${FLATPAK_ID}.desktop ${FLATPAK_DEST}/share/applications/${FLATPAK_ID}.desktop
|
||||
- install -Dm0755 metadata/launch-script.sh ${{FLATPAK_DEST}}/bin/launch-script.sh
|
||||
- install -Dm0644 metadata/policies.json ${{FLATPAK_DEST}}/bin/distribution/policies.json
|
||||
- install -Dm0644 metadata/icons/${{FLATPAK_ID}}.svg ${{FLATPAK_DEST}}/share/icons/hicolor/scalable/apps/${{FLATPAK_ID}}.svg
|
||||
- install -Dm0644 metadata/${{FLATPAK_ID}}.metainfo.xml ${{FLATPAK_DEST}}/share/metainfo/${{FLATPAK_ID}}.metainfo.xml
|
||||
- install -Dm0644 metadata/${{FLATPAK_ID}}.desktop ${{FLATPAK_DEST}}/share/applications/${{FLATPAK_ID}}.desktop
|
||||
|
||||
sources:
|
||||
- type: archive
|
||||
url: https://github.com/zen-browser/desktop/releases/download/1.6b/zen.linux-x86_64.tar.bz2
|
||||
url: https://github.com/zen-browser/desktop/releases/download/${version}/zen.linux-x86_64.tar.bz2
|
||||
sha256: {linux_sha256}
|
||||
strip-components: 0
|
||||
only-arches:
|
||||
- x86_64
|
||||
|
||||
- type: archive
|
||||
url: https://github.com/zen-browser/desktop/releases/download/1.6b/zen.linux-aarch64.tar.bz2
|
||||
url: https://github.com/zen-browser/desktop/releases/download/${version}/zen.linux-aarch64.tar.bz2
|
||||
sha256: {linux_aarch64_sha256}
|
||||
strip-components: 0
|
||||
only-arches:
|
||||
- aarch64
|
||||
|
||||
- type: archive
|
||||
url: https://github.com/zen-browser/flatpak/releases/download/1.6b/archive.tar
|
||||
url: https://github.com/zen-browser/flatpak/releases/download/${version}/archive.tar
|
||||
sha256: {flatpak_sha256}
|
||||
strip-components: 0
|
||||
dest: metadata
|
||||
@@ -11,7 +11,7 @@
|
||||
"start": "cd engine && ./mach run --noprofile",
|
||||
"import": "surfer import",
|
||||
"export": "surfer export",
|
||||
"init": "npm run bootstrap && npm run import",
|
||||
"init": "npm run download && npm run bootstrap && npm run import",
|
||||
"download": "surfer download",
|
||||
"bootstrap": "surfer bootstrap && surfer bootstrap",
|
||||
"package": "surfer package",
|
||||
|
||||
@@ -61,6 +61,7 @@ pref('pdfjs.enableHighlightFloatingButton', true);
|
||||
pref("alerts.showFavicons", true);
|
||||
|
||||
// Toolbars
|
||||
pref("browser.tabs.closeWindowWithLastTab", false);
|
||||
pref("browser.tabs.loadBookmarksInTabs", false);
|
||||
pref('browser.toolbars.bookmarks.visibility', 'never');
|
||||
pref("browser.bookmarks.openInTabClosesMenu", false);
|
||||
@@ -85,7 +86,7 @@ pref('zen.theme.accent-color', "#ffb787");
|
||||
pref('zen.theme.content-element-separation', 6); // In pixels
|
||||
pref('zen.theme.pill-button', false);
|
||||
pref('zen.theme.gradient', true);
|
||||
pref('zen.theme.essentials-favicon-bg', true);
|
||||
pref('zen.theme.essentials-favicon-bg', false);
|
||||
|
||||
pref('zen.tabs.show-newtab-vertical', true);
|
||||
pref('zen.view.show-newtab-button-border-top', true);
|
||||
@@ -101,20 +102,15 @@ pref('zen.injections.match-urls', 'http://localhost/*', locked);
|
||||
pref('zen.rice.share.notice.accepted', false);
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
pref('zen.theme.border-radius', 10); // In pixels
|
||||
#else
|
||||
#ifdef XP_WIN
|
||||
pref('zen.theme.border-radius', 6); // In pixels
|
||||
pref('zen.theme.border-radius', 11); // In pixels
|
||||
#else
|
||||
pref('zen.theme.border-radius', 8); // In pixels
|
||||
#endif
|
||||
#endif
|
||||
|
||||
pref('zen.theme.color-prefs.use-workspace-colors', true);
|
||||
pref('zen.theme.color-prefs.amoled', false);
|
||||
pref('zen.theme.color-prefs.colorful', false);
|
||||
|
||||
pref('zen.view.compact', false);
|
||||
pref('zen.view.compact.hide-tabbar', true);
|
||||
pref('zen.view.compact.hide-toolbar', false);
|
||||
pref('zen.view.compact.toolbar-flash-popup', true);
|
||||
@@ -169,6 +165,7 @@ pref('zen.tab-unloader.enabled', true);
|
||||
pref('zen.tab-unloader.timeout-minutes', 20);
|
||||
pref('zen.tab-unloader.excluded-urls', "example.com,example.org");
|
||||
|
||||
pref('zen.pinned-tab-manager.debug', false);
|
||||
pref('zen.pinned-tab-manager.restore-pinned-tabs-to-pinned-url', false);
|
||||
pref('zen.pinned-tab-manager.close-shortcut-behavior', 'switch');
|
||||
|
||||
|
||||
@@ -11,8 +11,9 @@ export var ZenCustomizableUI = new (class {
|
||||
'zen-sidebar-top-buttons',
|
||||
{
|
||||
type: this.TYPE_TOOLBAR,
|
||||
defaultPlacements: AppConstants.platform === 'macosx' ? [] : ['zen-sidepanel-button'],
|
||||
defaultPlacements: ['home-button'],
|
||||
defaultCollapsed: null,
|
||||
overflowable: true,
|
||||
},
|
||||
true
|
||||
);
|
||||
@@ -34,6 +35,16 @@ export var ZenCustomizableUI = new (class {
|
||||
}
|
||||
|
||||
_addSidebarButtons(window) {
|
||||
const toolbox = window.document.getElementById('navigator-toolbox');
|
||||
|
||||
// Set a splitter to navigator-toolbox
|
||||
const splitter = window.document.createXULElement('splitter');
|
||||
splitter.setAttribute('id', 'zen-sidebar-splitter');
|
||||
splitter.setAttribute('orient', 'horizontal');
|
||||
splitter.setAttribute('resizebefore', 'sibling');
|
||||
splitter.setAttribute('resizeafter', 'none');
|
||||
toolbox.insertAdjacentElement('afterend', splitter);
|
||||
|
||||
const sidebarBox = window.MozXULElement.parseXULToFragment(`
|
||||
<toolbar id="zen-sidebar-top-buttons"
|
||||
fullscreentoolbar="true"
|
||||
@@ -45,14 +56,29 @@ export var ZenCustomizableUI = new (class {
|
||||
flex="1"
|
||||
skipintoolbarset="true"
|
||||
customizationtarget="zen-sidebar-top-buttons-customization-target"
|
||||
overflowable="true"
|
||||
default-overflowbutton="nav-bar-overflow-button"
|
||||
default-overflowtarget="widget-overflow-list"
|
||||
default-overflowpanel="widget-overflow"
|
||||
addon-webext-overflowbutton="unified-extensions-button"
|
||||
addon-webext-overflowtarget="overflowed-extensions-list"
|
||||
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 removable="true" class="toolbarbutton-1 zen-sidebar-action-button zen-compact-mode-ignore" id="zen-sidepanel-button" data-l10n-id="sidebar-zen-sidepanel" onclick="gZenBrowserManagerSidebar.toggle();"></toolbarbutton>
|
||||
</hbox>
|
||||
</toolbar>
|
||||
`);
|
||||
window.document.getElementById('navigator-toolbox').prepend(sidebarBox);
|
||||
toolbox.prepend(sidebarBox);
|
||||
new window.MutationObserver((e) => {
|
||||
if (e[0].type !== 'attributes' || e[0].attributeName !== 'width') return;
|
||||
this._dispatchResizeEvent(window);
|
||||
}).observe(toolbox, {
|
||||
attributes: true, //configure it to listen to attribute changes
|
||||
});
|
||||
|
||||
// remove all styles except for the width, since we are xulstoring the complet style list
|
||||
const width = toolbox.style.width || '180px';
|
||||
toolbox.removeAttribute('style');
|
||||
toolbox.style.width = width;
|
||||
|
||||
const newTab = window.document.getElementById('vertical-tabs-newtab-button');
|
||||
newTab.classList.add('zen-sidebar-action-button');
|
||||
@@ -95,6 +121,10 @@ export var ZenCustomizableUI = new (class {
|
||||
}
|
||||
}
|
||||
|
||||
_dispatchResizeEvent(window) {
|
||||
window.dispatchEvent(new window.Event('resize'));
|
||||
}
|
||||
|
||||
registerToolbarNodes(window) {
|
||||
window.CustomizableUI.registerToolbarNode(window.document.getElementById('zen-sidebar-top-buttons'));
|
||||
window.CustomizableUI.registerToolbarNode(window.document.getElementById('zen-sidebar-icons-wrapper'));
|
||||
|
||||
@@ -84,19 +84,6 @@
|
||||
sidebarPanelWrapper.prepend(elem);
|
||||
}
|
||||
}
|
||||
|
||||
// remove all styles except for the width, since we are xulstoring the complet style list
|
||||
const width = toolbox.style.width || '270px';
|
||||
toolbox.removeAttribute('style');
|
||||
toolbox.style.width = width;
|
||||
|
||||
// Set a splitter to navigator-toolbox
|
||||
const splitter = document.createXULElement('splitter');
|
||||
splitter.setAttribute('id', 'zen-sidebar-splitter');
|
||||
splitter.setAttribute('orient', 'horizontal');
|
||||
splitter.setAttribute('resizebefore', 'sibling');
|
||||
splitter.setAttribute('resizeafter', 'none');
|
||||
toolbox.insertAdjacentElement('afterend', splitter);
|
||||
},
|
||||
|
||||
_initSearchBar() {
|
||||
|
||||
@@ -201,6 +201,7 @@ var gZenVerticalTabsManager = {
|
||||
this.__topButtonsSeparatorElement = document.createElement('div');
|
||||
this.__topButtonsSeparatorElement.id = 'zen-sidebar-top-buttons-separator';
|
||||
this.__topButtonsSeparatorElement.setAttribute('skipintoolbarset', 'true');
|
||||
this.__topButtonsSeparatorElement.setAttribute('overflows', 'false');
|
||||
return this.__topButtonsSeparatorElement;
|
||||
},
|
||||
|
||||
@@ -210,6 +211,7 @@ var gZenVerticalTabsManager = {
|
||||
this.__actualWindowButtons = !this.isWindowsStyledButtons
|
||||
? document.querySelector('.titlebar-buttonbox-container') // TODO: test if it works 100% of the time
|
||||
: document.querySelector('#nav-bar .titlebar-buttonbox-container');
|
||||
this.__actualWindowButtons.setAttribute('overflows', 'false');
|
||||
}
|
||||
return this.__actualWindowButtons;
|
||||
},
|
||||
@@ -231,14 +233,6 @@ var gZenVerticalTabsManager = {
|
||||
},
|
||||
|
||||
initializePreferences(updateEvent) {
|
||||
XPCOMUtils.defineLazyPreferenceGetter(
|
||||
this,
|
||||
'_prefsCompactMode',
|
||||
'zen.view.compact',
|
||||
false
|
||||
// no need to update the event, it's handled by the compact mode manager
|
||||
);
|
||||
|
||||
XPCOMUtils.defineLazyPreferenceGetter(this, '_prefsVerticalTabs', 'zen.tabs.vertical', true, updateEvent);
|
||||
XPCOMUtils.defineLazyPreferenceGetter(this, '_prefsRightSide', 'zen.tabs.vertical.right-side', false, updateEvent);
|
||||
XPCOMUtils.defineLazyPreferenceGetter(this, '_prefsUseSingleToolbar', 'zen.view.use-single-toolbar', false, updateEvent);
|
||||
@@ -265,7 +259,7 @@ var gZenVerticalTabsManager = {
|
||||
}
|
||||
|
||||
const topButtons = document.getElementById('zen-sidebar-top-buttons');
|
||||
const isCompactMode = this._prefsCompactMode && !forCustomizableMode;
|
||||
const isCompactMode = gZenCompactModeManager.preference && !forCustomizableMode;
|
||||
const isVerticalTabs = this._prefsVerticalTabs || forCustomizableMode;
|
||||
const isSidebarExpanded = this._prefsSidebarExpanded || !isVerticalTabs;
|
||||
const isRightSide = this._prefsRightSide && isVerticalTabs;
|
||||
@@ -332,7 +326,10 @@ var gZenVerticalTabsManager = {
|
||||
this._topButtonsSeparatorElement.after(button);
|
||||
}
|
||||
buttonsTarget.prepend(document.getElementById('unified-extensions-button'));
|
||||
buttonsTarget.prepend(document.getElementById('PanelUI-button'));
|
||||
const panelUIButton = document.getElementById('PanelUI-button');
|
||||
buttonsTarget.prepend(panelUIButton);
|
||||
panelUIButton.setAttribute('overflows', 'false');
|
||||
buttonsTarget.parentElement.append(document.getElementById('nav-bar-overflow-button'));
|
||||
if (this.isWindowsStyledButtons && !doNotChangeWindowButtons) {
|
||||
appContentNavbarContaienr.append(windowButtons);
|
||||
}
|
||||
@@ -357,7 +354,10 @@ var gZenVerticalTabsManager = {
|
||||
}
|
||||
this._topButtonsSeparatorElement.remove();
|
||||
document.documentElement.removeAttribute('zen-single-toolbar');
|
||||
navBar.appendChild(document.getElementById('PanelUI-button'));
|
||||
const panelUIButton = document.getElementById('PanelUI-button');
|
||||
navBar.appendChild(panelUIButton);
|
||||
panelUIButton.removeAttribute('overflows');
|
||||
navBar.appendChild(document.getElementById('nav-bar-overflow-button'));
|
||||
this._toolbarOriginalParent.prepend(navBar);
|
||||
if (!dontRebuildAreas) {
|
||||
this.rebuildAreas();
|
||||
@@ -420,6 +420,7 @@ var gZenVerticalTabsManager = {
|
||||
|
||||
// Always move the splitter next to the sidebar
|
||||
this.navigatorToolbox.after(document.getElementById('zen-sidebar-splitter'));
|
||||
window.dispatchEvent(new Event('resize'));
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
@@ -452,4 +453,15 @@ var gZenVerticalTabsManager = {
|
||||
const newVal = !Services.prefs.getBoolPref('zen.tabs.vertical.right-side');
|
||||
Services.prefs.setBoolPref('zen.tabs.vertical.right-side', newVal);
|
||||
},
|
||||
|
||||
appendCustomizableItem(target, child, placements) {
|
||||
if (
|
||||
target.id === 'zen-sidebar-top-buttons-customization-target' &&
|
||||
this._hasSetSingleToolbar &&
|
||||
placements.includes(child.id)
|
||||
) {
|
||||
return this._topButtonsSeparatorElement.before(child);
|
||||
}
|
||||
target.appendChild(child);
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/browser/base/content/browser.xhtml b/browser/base/content/browser.xhtml
|
||||
index 5dd337a2ffc9f9107d735f4dc96a50d57b12d213..58ecaf7136e13885ac38d74d40b5ef0f52cd7684 100644
|
||||
index ca8953f3604f4f70de76576964af5f3c733f17a0..a2731ef6d4392301217cd05f6583e4814f1118e2 100644
|
||||
--- a/browser/base/content/browser.xhtml
|
||||
+++ b/browser/base/content/browser.xhtml
|
||||
@@ -98,6 +98,8 @@
|
||||
@@ -101,6 +101,8 @@
|
||||
|
||||
<title data-l10n-id="browser-main-window-title"></title>
|
||||
|
||||
@@ -11,7 +11,7 @@ index 5dd337a2ffc9f9107d735f4dc96a50d57b12d213..58ecaf7136e13885ac38d74d40b5ef0f
|
||||
# All JS files which are needed by browser.xhtml and other top level windows to
|
||||
# support MacOS specific features *must* go into the global-scripts.inc file so
|
||||
# that they can be shared with macWindow.inc.xhtml.
|
||||
@@ -141,6 +143,7 @@
|
||||
@@ -145,6 +147,7 @@
|
||||
window.addEventListener("DOMContentLoaded",
|
||||
gBrowserInit.onDOMContentLoaded.bind(gBrowserInit), { once: true });
|
||||
</script>
|
||||
@@ -19,18 +19,18 @@ index 5dd337a2ffc9f9107d735f4dc96a50d57b12d213..58ecaf7136e13885ac38d74d40b5ef0f
|
||||
</head>
|
||||
<html:body xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
# All sets except for popupsets (commands, keys, and stringbundles)
|
||||
@@ -162,9 +165,12 @@
|
||||
@@ -166,9 +169,12 @@
|
||||
</vbox>
|
||||
</html:template>
|
||||
|
||||
-#include navigator-toolbox.inc.xhtml
|
||||
-
|
||||
-#include browser-box.inc.xhtml
|
||||
+ <hbox id="zen-main-app-wrapper" flex="1">
|
||||
+ <hbox id="zen-main-app-wrapper" flex="1" persist="zen-compact-mode">
|
||||
+ #include navigator-toolbox.inc.xhtml
|
||||
+ <html:span id="zen-sidebar-box-container">
|
||||
+ </html:span>
|
||||
+ #include browser-box.inc.xhtml
|
||||
+ #include browser-box.inc.xhtml
|
||||
+ </hbox>
|
||||
|
||||
<html:template id="customizationPanel">
|
||||
|
||||
@@ -28,19 +28,18 @@
|
||||
|
||||
# Scripts used all over the browser
|
||||
<script src="chrome://browser/content/zen-components/ZenThemesCommon.mjs" />
|
||||
<script src="chrome://browser/content/zen-components/ZenActorsManager.mjs" />
|
||||
<script src="chrome://browser/content/zen-components/ZenGlanceManager.mjs" />
|
||||
<script src="chrome://browser/content/zen-components/ZenThemesImporter.mjs" />
|
||||
<script src="chrome://browser/content/zen-components/ZenCompactMode.mjs" />
|
||||
<script src="chrome://browser/content/ZenUIManager.mjs" />
|
||||
<script src="chrome://browser/content/zen-components/ZenSidebarManager.mjs"/>
|
||||
<script src="chrome://browser/content/zen-components/ZenTabUnloader.mjs" />
|
||||
<script src="chrome://browser/content/zen-components/ZenWorkspaces.mjs" />
|
||||
<script src="chrome://browser/content/zen-components/ZenPinnedTabsStorage.mjs" />
|
||||
<script src="chrome://browser/content/zen-components/ZenWorkspacesStorage.mjs" />
|
||||
<script src="chrome://browser/content/zen-components/ZenPinnedTabManager.mjs" />
|
||||
<script src="chrome://browser/content/zen-components/ZenGradientGenerator.mjs" />
|
||||
<script src="chrome://browser/content/zen-components/ZenViewSplitter.mjs"/>
|
||||
<script src="chrome://browser/content/zen-components/ZenProfileDialogUI.mjs" />
|
||||
<script src="chrome://browser/content/zen-components/ZenGlanceManager.mjs" />
|
||||
|
||||
# Unimportant scripts
|
||||
<script src="chrome://browser/content/zen-components/ZenRices.mjs" />
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
content/browser/zen-components/ZenSidebarManager.mjs (zen-components/ZenSidebarManager.mjs)
|
||||
content/browser/zen-components/ZenProfileDialogUI.mjs (zen-components/ZenProfileDialogUI.mjs)
|
||||
content/browser/zen-components/ZenKeyboardShortcuts.mjs (zen-components/ZenKeyboardShortcuts.mjs)
|
||||
content/browser/zen-components/ZenThemeBuilder.mjs (zen-components/ZenThemeBuilder.mjs)
|
||||
content/browser/zen-components/ZenThemesImporter.mjs (zen-components/ZenThemesImporter.mjs)
|
||||
content/browser/zen-components/ZenTabUnloader.mjs (zen-components/ZenTabUnloader.mjs)
|
||||
content/browser/zen-components/ZenPinnedTabsStorage.mjs (zen-components/ZenPinnedTabsStorage.mjs)
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
<script type="text/javascript">
|
||||
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenCommonUtils.mjs", this);
|
||||
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenKeyboardShortcuts.mjs", this);
|
||||
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenWorkspaces.mjs", this);
|
||||
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenWorkspacesSync.mjs", this);
|
||||
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenWorkspacesStorage.mjs", this);
|
||||
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenActorsManager.mjs", this);
|
||||
</script>
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
skipintoolbarset="true"
|
||||
context="toolbar-context-menu"
|
||||
mode="icons">
|
||||
<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 removable="true" class="toolbarbutton-1 zen-sidebar-action-button zen-compact-mode-ignore" id="zen-sidepanel-button" data-l10n-id="sidebar-zen-sidepanel" onclick="gZenBrowserManagerSidebar.toggle();"></toolbarbutton>
|
||||
<toolbarbutton removable="true" id="zen-workspaces-button"></toolbarbutton>
|
||||
<toolbarbutton id="zen-profile-button"
|
||||
class="zen-sidebar-action-button toolbarbutton-1 chromeclass-toolbar-additional"
|
||||
delegatesanchor="true"
|
||||
@@ -22,4 +25,4 @@
|
||||
<image id="zen-profile-button-icon" />
|
||||
</vbox>
|
||||
</toolbarbutton>
|
||||
</toolbar>
|
||||
</toolbar>
|
||||
|
||||
@@ -7,14 +7,7 @@
|
||||
& #tabbrowser-tabbox #tabbrowser-tabpanels .browserSidebarContainer {
|
||||
width: -moz-available;
|
||||
--zen-native-content-radius: env(-moz-gtk-csd-titlebar-radius, var(--zen-border-radius));
|
||||
border-radius: var(
|
||||
--zen-webview-border-radius,
|
||||
/* Inner radius calculation:
|
||||
* 1. If the native radius - the separation is less than 4px, use 4px.
|
||||
* 2. Otherwise, use the the calculated value (inner radius = outer radius - separation).
|
||||
*/
|
||||
max(4px, calc(var(--zen-native-content-radius) - var(--zen-element-separation)))
|
||||
);
|
||||
border-radius: var(--zen-native-inner-radius);
|
||||
position: relative;
|
||||
|
||||
/* For glance */
|
||||
@@ -24,13 +17,8 @@
|
||||
|
||||
overflow: hidden;
|
||||
|
||||
:root[zen-right-side='true'] & {
|
||||
margin-left: var(--zen-element-separation);
|
||||
}
|
||||
|
||||
:root:not([zen-no-padding='true']) & {
|
||||
margin: 1px;
|
||||
box-shadow: 0 0 1px 1px light-dark(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.3));
|
||||
box-shadow: var(--zen-big-shadow);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
&[animating='true']::after {
|
||||
background: var(--zen-main-browser-background-old);
|
||||
backdrop-filter: blur(5px);
|
||||
animation: zen-main-app-wrapper-animation 0.6s ease forwards;
|
||||
animation: zen-main-app-wrapper-animation 0.4s ease forwards;
|
||||
transition: 0s;
|
||||
}
|
||||
}
|
||||
@@ -123,10 +123,11 @@
|
||||
}
|
||||
|
||||
#zen-appcontent-wrapper {
|
||||
max-width: 100%;
|
||||
min-width: 1px;
|
||||
overflow-x: hidden;
|
||||
z-index: 1;
|
||||
/* Use this trick to prevent bookmarks from overflowing the window,
|
||||
* without using overflow: hidden.
|
||||
*/
|
||||
min-width: 1px;
|
||||
}
|
||||
|
||||
:root:not([inDOMFullscreen='true']):not([chromehidden~='location']):not([chromehidden~='toolbar']) {
|
||||
@@ -142,16 +143,13 @@
|
||||
&[zen-right-side='true'] #zen-tabbox-wrapper {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
&:not([zen-no-padding='true'], [zen-right-side='true']) #zen-tabbox-wrapper {
|
||||
margin-left: 1px;
|
||||
}
|
||||
}
|
||||
|
||||
#tabbrowser-tabbox {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
position: relative;
|
||||
gap: var(--zen-element-separation);
|
||||
}
|
||||
|
||||
.titlebar-buttonbox-container {
|
||||
|
||||
@@ -5,330 +5,328 @@
|
||||
*/
|
||||
/* All overrides for compact mode go here */
|
||||
|
||||
@media (-moz-bool-pref: 'zen.view.compact') {
|
||||
:root:not([customizing]):not([inDOMFullscreen='true']) {
|
||||
#zen-sidebar-top-buttons:has(#zen-sidebar-top-buttons-customization-target:empty) {
|
||||
max-height: 0 !important;
|
||||
min-height: 0 !important;
|
||||
opacity: 0;
|
||||
overflow: hidden;
|
||||
pointer-events: none;
|
||||
:root[zen-compact-mode='true']:not([customizing]):not([inDOMFullscreen='true']) {
|
||||
#zen-sidebar-top-buttons:has(#zen-sidebar-top-buttons-customization-target:empty) {
|
||||
max-height: 0 !important;
|
||||
min-height: 0 !important;
|
||||
opacity: 0;
|
||||
overflow: hidden;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
@media (-moz-bool-pref: 'zen.view.compact.hide-tabbar') or (-moz-bool-pref: 'zen.view.use-single-toolbar') {
|
||||
#zen-sidebar-web-panel-wrapper:has(#zen-sidebar-web-panel[pinned='true']) {
|
||||
margin-left: var(--zen-sidebar-web-panel-spacing) !important;
|
||||
}
|
||||
|
||||
@media (-moz-bool-pref: 'zen.view.compact.hide-tabbar') or (-moz-bool-pref: 'zen.view.use-single-toolbar') {
|
||||
#zen-sidebar-web-panel-wrapper:has(#zen-sidebar-web-panel[pinned='true']) {
|
||||
margin-left: var(--zen-sidebar-web-panel-spacing) !important;
|
||||
#zen-tabbox-wrapper {
|
||||
/* Remove extra 1px of margine we have to add to the tabbox */
|
||||
margin-left: 0 !important;
|
||||
}
|
||||
|
||||
#zen-appcontent-wrapper {
|
||||
margin-left: var(--zen-element-separation) !important;
|
||||
|
||||
& #tabbrowser-tabbox {
|
||||
margin-left: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
#zen-sidebar-top-buttons-customization-target {
|
||||
padding-inline-start: calc(var(--zen-toolbox-padding) - var(--toolbarbutton-outer-padding)) !important;
|
||||
}
|
||||
|
||||
#zen-sidebar-splitter {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
#navigator-toolbox {
|
||||
--zen-toolbox-max-width: 64px !important;
|
||||
--zen-compact-float: var(--zen-element-separation);
|
||||
|
||||
&:not([animate='true']) {
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
transition:
|
||||
left 0.25s ease,
|
||||
right 0.25s ease,
|
||||
opacity 1.5s ease;
|
||||
top: 0;
|
||||
bottom: var(--zen-element-separation);
|
||||
opacity: 0;
|
||||
padding: 0 var(--zen-compact-float) !important;
|
||||
|
||||
:root[zen-single-toolbar='true'] & {
|
||||
top: var(--zen-element-separation);
|
||||
}
|
||||
}
|
||||
|
||||
#zen-tabbox-wrapper {
|
||||
/* Remove extra 1px of margine we have to add to the tabbox */
|
||||
&:not([zen-right-side='true']) #nav-bar {
|
||||
margin-left: 0 !important;
|
||||
}
|
||||
|
||||
#zen-appcontent-wrapper {
|
||||
margin-left: var(--zen-element-separation) !important;
|
||||
|
||||
& #tabbrowser-tabbox {
|
||||
margin-left: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
#zen-sidebar-top-buttons-customization-target {
|
||||
padding-inline-start: calc(var(--zen-toolbox-padding) - var(--toolbarbutton-outer-padding)) !important;
|
||||
}
|
||||
|
||||
#zen-sidebar-splitter {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
#navigator-toolbox {
|
||||
--zen-toolbox-max-width: 64px !important;
|
||||
--zen-compact-float: var(--zen-element-separation);
|
||||
|
||||
&:not([animate='true']) {
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
transition:
|
||||
left 0.25s ease,
|
||||
right 0.25s ease,
|
||||
opacity 1.5s ease;
|
||||
top: 0;
|
||||
bottom: var(--zen-element-separation);
|
||||
opacity: 0;
|
||||
padding: 0 var(--zen-compact-float) !important;
|
||||
|
||||
:root[zen-single-toolbar='true'] & {
|
||||
top: var(--zen-element-separation);
|
||||
}
|
||||
}
|
||||
|
||||
&:not([zen-right-side='true']) #nav-bar {
|
||||
margin-left: 0 !important;
|
||||
}
|
||||
|
||||
& #urlbar[open] {
|
||||
top: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
&:not([zen-right-side='true']) #navigator-toolbox {
|
||||
left: calc(-1 * var(--zen-sidebar-width) + var(--zen-element-separation));
|
||||
}
|
||||
|
||||
/* When we have multiple toolbars and the top-toolbar is NOT being hidden,
|
||||
* we need to adjust the top-padding of the toolbox to account for the
|
||||
* extra toolbar height. */
|
||||
@media not (-moz-bool-pref: 'zen.view.compact.hide-toolbar') {
|
||||
&:not([zen-single-toolbar='true']) #navigator-toolbox:not([animate='true']) {
|
||||
margin-top: var(--zen-toolbar-height) !important;
|
||||
}
|
||||
}
|
||||
|
||||
&[zen-right-side='true'] {
|
||||
& #navigator-toolbox {
|
||||
--zen-compact-float: calc(var(--zen-element-separation) + 1px);
|
||||
|
||||
&:not([animate='true']) {
|
||||
right: calc(-1 * var(--zen-sidebar-width) + var(--zen-element-separation));
|
||||
}
|
||||
}
|
||||
|
||||
& .browserSidebarContainer {
|
||||
margin-left: 0 !important;
|
||||
margin-right: var(--zen-element-separation) !important;
|
||||
}
|
||||
}
|
||||
|
||||
#navigator-toolbox:not([animate='true']) #titlebar {
|
||||
box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.1);
|
||||
border-radius: calc(var(--zen-border-radius) - 2px);
|
||||
padding: var(--zen-toolbox-padding) !important;
|
||||
position: relative;
|
||||
background: var(--zen-dialog-background);
|
||||
outline: 1px solid light-dark(rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.1));
|
||||
|
||||
:root[zen-single-toolbar='true'] {
|
||||
padding-top: 0 !important;
|
||||
margin-left: 0 !important;
|
||||
}
|
||||
|
||||
@media (-moz-bool-pref: 'zen.view.compact.color-sidebar') {
|
||||
background: var(--zen-main-browser-background-toolbar) !important;
|
||||
background-attachment: fixed !important;
|
||||
background-size: 2000px !important; /* Dont ask me why */
|
||||
backdrop-filter: blur(5px) !important;
|
||||
}
|
||||
}
|
||||
|
||||
#navigator-toolbox:hover,
|
||||
#navigator-toolbox[zen-has-hover],
|
||||
#navigator-toolbox[zen-user-show],
|
||||
#navigator-toolbox[flash-popup],
|
||||
#navigator-toolbox[has-popup-menu],
|
||||
#navigator-toolbox[movingtab],
|
||||
#navigator-toolbox:has(.tabbrowser-tab:active),
|
||||
#navigator-toolbox:has(
|
||||
*:is([panelopen='true'], [open='true'], #nav-bar:focus-within):not(tab):not(.zen-compact-mode-ignore)
|
||||
) {
|
||||
&:not([animate='true']) {
|
||||
--zen-compact-mode-func: linear(
|
||||
0 0%,
|
||||
0.002958 1%,
|
||||
0.01137 2%,
|
||||
0.024581 3%,
|
||||
0.041981 4%,
|
||||
0.063001 5%,
|
||||
0.087118 6%,
|
||||
0.113846 7.000000000000001%,
|
||||
0.14274 8%,
|
||||
0.173391 9%,
|
||||
0.205425 10%,
|
||||
0.238504 11%,
|
||||
0.272318 12%,
|
||||
0.30659 13%,
|
||||
0.341071 14.000000000000002%,
|
||||
0.375535 15%,
|
||||
0.409787 16%,
|
||||
0.44365 17%,
|
||||
0.476971 18%,
|
||||
0.509618 19%,
|
||||
0.541476 20%,
|
||||
0.572448 21%,
|
||||
0.602453 22%,
|
||||
0.631425 23%,
|
||||
0.65931 24%,
|
||||
0.686067 25%,
|
||||
0.711668 26%,
|
||||
0.736092 27%,
|
||||
0.759328 28.000000000000004%,
|
||||
0.781375 28.999999999999996%,
|
||||
0.802235 30%,
|
||||
0.821921 31%,
|
||||
0.840449 32%,
|
||||
0.857841 33%,
|
||||
0.874121 34%,
|
||||
0.88932 35%,
|
||||
0.903469 36%,
|
||||
0.916603 37%,
|
||||
0.928759 38%,
|
||||
0.939975 39%,
|
||||
0.950291 40%,
|
||||
0.959747 41%,
|
||||
0.968385 42%,
|
||||
0.976244 43%,
|
||||
0.983366 44%,
|
||||
0.989792 45%,
|
||||
0.995562 46%,
|
||||
1.000716 47%,
|
||||
1.005292 48%,
|
||||
1.009328 49%,
|
||||
1.01286 50%,
|
||||
1.015925 51%,
|
||||
1.018556 52%,
|
||||
1.020787 53%,
|
||||
1.022648 54%,
|
||||
1.024172 55.00000000000001%,
|
||||
1.025385 56.00000000000001%,
|
||||
1.026316 56.99999999999999%,
|
||||
1.026991 57.99999999999999%,
|
||||
1.027434 59%,
|
||||
1.027669 60%,
|
||||
1.027717 61%,
|
||||
1.027599 62%,
|
||||
1.027334 63%,
|
||||
1.02694 64%,
|
||||
1.026433 65%,
|
||||
1.025829 66%,
|
||||
1.025143 67%,
|
||||
1.024388 68%,
|
||||
1.023575 69%,
|
||||
1.022715 70%,
|
||||
1.02182 71%,
|
||||
1.020898 72%,
|
||||
1.019957 73%,
|
||||
1.019005 74%,
|
||||
1.018048 75%,
|
||||
1.017094 76%,
|
||||
1.016146 77%,
|
||||
1.015211 78%,
|
||||
1.014291 79%,
|
||||
1.013391 80%,
|
||||
1.012513 81%,
|
||||
1.01166 82%,
|
||||
1.010835 83%,
|
||||
1.010039 84%,
|
||||
1.009273 85%,
|
||||
1.008538 86%,
|
||||
1.007836 87%,
|
||||
1.007166 88%,
|
||||
1.00653 89%,
|
||||
1.005926 90%,
|
||||
1.005355 91%,
|
||||
1.004817 92%,
|
||||
1.00431 93%,
|
||||
1.003835 94%,
|
||||
1.003391 95%,
|
||||
1.002976 96%,
|
||||
1.002591 97%,
|
||||
1.002233 98%,
|
||||
1.001902 99%,
|
||||
1.001597 100%
|
||||
);
|
||||
transition:
|
||||
left 0.3125s var(--zen-compact-mode-func),
|
||||
right 0.3125s var(--zen-compact-mode-func);
|
||||
opacity: 1;
|
||||
|
||||
left: -1px;
|
||||
:root[zen-right-side='true'] & {
|
||||
right: -1px;
|
||||
left: auto;
|
||||
}
|
||||
}
|
||||
& #urlbar[open] {
|
||||
top: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (-moz-bool-pref: 'zen.view.compact.hide-toolbar') {
|
||||
&:not([zen-single-toolbar='true']) {
|
||||
& #navigator-toolbox {
|
||||
top: 0;
|
||||
&:not([zen-right-side='true']) #navigator-toolbox {
|
||||
left: calc(-1 * var(--zen-sidebar-width) + var(--zen-element-separation));
|
||||
}
|
||||
|
||||
/* When we have multiple toolbars and the top-toolbar is NOT being hidden,
|
||||
* we need to adjust the top-padding of the toolbox to account for the
|
||||
* extra toolbar height. */
|
||||
@media not (-moz-bool-pref: 'zen.view.compact.hide-toolbar') {
|
||||
&:not([zen-single-toolbar='true']) #navigator-toolbox:not([animate='true']) {
|
||||
margin-top: var(--zen-toolbar-height) !important;
|
||||
}
|
||||
}
|
||||
|
||||
&[zen-right-side='true'] {
|
||||
& #navigator-toolbox {
|
||||
--zen-compact-float: calc(var(--zen-element-separation) + 1px);
|
||||
|
||||
&:not([animate='true']) {
|
||||
right: calc(-1 * var(--zen-sidebar-width) + var(--zen-element-separation));
|
||||
}
|
||||
}
|
||||
|
||||
& .browserSidebarContainer {
|
||||
margin-left: 0 !important;
|
||||
margin-right: var(--zen-element-separation) !important;
|
||||
}
|
||||
}
|
||||
|
||||
#navigator-toolbox:not([animate='true']) #titlebar {
|
||||
box-shadow: var(--zen-big-shadow);
|
||||
border-radius: calc(var(--zen-native-inner-radius) + 2px);
|
||||
padding: var(--zen-toolbox-padding) !important;
|
||||
position: relative;
|
||||
background: var(--zen-dialog-background);
|
||||
border: 1px solid var(--zen-colors-border-contrast);
|
||||
|
||||
:root[zen-single-toolbar='true'] {
|
||||
padding-top: 0 !important;
|
||||
margin-left: 0 !important;
|
||||
}
|
||||
|
||||
@media (-moz-bool-pref: 'zen.view.compact.color-sidebar') {
|
||||
background: var(--zen-main-browser-background-toolbar) !important;
|
||||
background-attachment: fixed !important;
|
||||
background-size: 2000px !important; /* Dont ask me why */
|
||||
backdrop-filter: blur(5px) !important;
|
||||
}
|
||||
}
|
||||
|
||||
#navigator-toolbox:hover,
|
||||
#navigator-toolbox[zen-has-hover],
|
||||
#navigator-toolbox[zen-user-show],
|
||||
#navigator-toolbox[flash-popup],
|
||||
#navigator-toolbox[has-popup-menu],
|
||||
#navigator-toolbox[movingtab],
|
||||
#navigator-toolbox:has(.tabbrowser-tab:active),
|
||||
#navigator-toolbox:has(
|
||||
*:is([panelopen='true'], [open='true'], #nav-bar:focus-within):not(tab):not(.zen-compact-mode-ignore)
|
||||
) {
|
||||
&:not([animate='true']) {
|
||||
--zen-compact-mode-func: linear(
|
||||
0 0%,
|
||||
0.002748 1%,
|
||||
0.010544 2%,
|
||||
0.022757 3%,
|
||||
0.038804 4%,
|
||||
0.058151 5%,
|
||||
0.080308 6%,
|
||||
0.104828 7.000000000000001%,
|
||||
0.131301 8%,
|
||||
0.159358 9%,
|
||||
0.188662 10%,
|
||||
0.21891 11%,
|
||||
0.249828 12%,
|
||||
0.281172 13%,
|
||||
0.312724 14.000000000000002%,
|
||||
0.344288 15%,
|
||||
0.375693 16%,
|
||||
0.40679 17%,
|
||||
0.437447 18%,
|
||||
0.467549 19%,
|
||||
0.497 20%,
|
||||
0.525718 21%,
|
||||
0.553633 22%,
|
||||
0.580688 23%,
|
||||
0.60684 24%,
|
||||
0.632052 25%,
|
||||
0.656298 26%,
|
||||
0.679562 27%,
|
||||
0.701831 28.000000000000004%,
|
||||
0.723104 28.999999999999996%,
|
||||
0.743381 30%,
|
||||
0.76267 31%,
|
||||
0.780983 32%,
|
||||
0.798335 33%,
|
||||
0.814744 34%,
|
||||
0.830233 35%,
|
||||
0.844826 36%,
|
||||
0.858549 37%,
|
||||
0.87143 38%,
|
||||
0.883498 39%,
|
||||
0.894782 40%,
|
||||
0.905314 41%,
|
||||
0.915125 42%,
|
||||
0.924247 43%,
|
||||
0.93271 44%,
|
||||
0.940547 45%,
|
||||
0.947787 46%,
|
||||
0.954463 47%,
|
||||
0.960603 48%,
|
||||
0.966239 49%,
|
||||
0.971397 50%,
|
||||
0.976106 51%,
|
||||
0.980394 52%,
|
||||
0.984286 53%,
|
||||
0.987808 54%,
|
||||
0.990984 55.00000000000001%,
|
||||
0.993837 56.00000000000001%,
|
||||
0.99639 56.99999999999999%,
|
||||
0.998664 57.99999999999999%,
|
||||
1.000679 59%,
|
||||
1.002456 60%,
|
||||
1.004011 61%,
|
||||
1.005363 62%,
|
||||
1.006528 63%,
|
||||
1.007522 64%,
|
||||
1.008359 65%,
|
||||
1.009054 66%,
|
||||
1.009618 67%,
|
||||
1.010065 68%,
|
||||
1.010405 69%,
|
||||
1.010649 70%,
|
||||
1.010808 71%,
|
||||
1.01089 72%,
|
||||
1.010904 73%,
|
||||
1.010857 74%,
|
||||
1.010757 75%,
|
||||
1.010611 76%,
|
||||
1.010425 77%,
|
||||
1.010205 78%,
|
||||
1.009955 79%,
|
||||
1.009681 80%,
|
||||
1.009387 81%,
|
||||
1.009077 82%,
|
||||
1.008754 83%,
|
||||
1.008422 84%,
|
||||
1.008083 85%,
|
||||
1.00774 86%,
|
||||
1.007396 87%,
|
||||
1.007052 88%,
|
||||
1.00671 89%,
|
||||
1.006372 90%,
|
||||
1.00604 91%,
|
||||
1.005713 92%,
|
||||
1.005394 93%,
|
||||
1.005083 94%,
|
||||
1.004782 95%,
|
||||
1.004489 96%,
|
||||
1.004207 97%,
|
||||
1.003935 98%,
|
||||
1.003674 99%,
|
||||
1.003423 100%
|
||||
);
|
||||
transition:
|
||||
left 0.3125s var(--zen-compact-mode-func),
|
||||
right 0.3125s var(--zen-compact-mode-func);
|
||||
opacity: 1;
|
||||
|
||||
left: -1px;
|
||||
:root[zen-right-side='true'] & {
|
||||
right: -1px;
|
||||
left: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (-moz-bool-pref: 'zen.view.compact.hide-toolbar') {
|
||||
&:not([zen-single-toolbar='true']) {
|
||||
& #navigator-toolbox {
|
||||
top: 0;
|
||||
}
|
||||
|
||||
& #navigator-toolbox {
|
||||
--zen-toolbox-top-align: var(--zen-element-separation);
|
||||
}
|
||||
|
||||
& #sidebar-box,
|
||||
& #titlebar,
|
||||
& #zen-appcontent-wrapper,
|
||||
& #zen-sidebar-web-panel-wrapper:has(#zen-sidebar-web-panel:not([pinned='true'])) {
|
||||
margin-top: var(--zen-element-separation) !important;
|
||||
}
|
||||
|
||||
& #zen-appcontent-wrapper {
|
||||
z-index: 3 !important;
|
||||
}
|
||||
|
||||
& #zen-sidebar-web-panel-wrapper:has(#zen-sidebar-web-panel[pinned='true']) {
|
||||
margin-top: calc(var(--zen-element-separation) * 2) !important;
|
||||
}
|
||||
|
||||
& #zen-appcontent-navbar-container {
|
||||
--zen-compact-toolbar-offset: 5px;
|
||||
position: absolute;
|
||||
top: calc((-1 * var(--zen-toolbar-height)) + var(--zen-element-separation) + 1px);
|
||||
left: 0;
|
||||
z-index: 20;
|
||||
box-shadow: 0 0 1px 1px rgba(0, 0, 0, 0.3) !important;
|
||||
border-bottom-left-radius: var(--zen-border-radius);
|
||||
border-bottom-right-radius: var(--zen-border-radius);
|
||||
border-top-left-radius: env(-moz-gtk-csd-titlebar-radius);
|
||||
border-top-right-radius: env(-moz-gtk-csd-titlebar-radius);
|
||||
transition: all 0.15s ease;
|
||||
width: 100%;
|
||||
opacity: 0;
|
||||
background: var(--zen-dialog-background);
|
||||
|
||||
max-height: var(--zen-toolbar-height);
|
||||
overflow: hidden;
|
||||
|
||||
& > * {
|
||||
position: relative !important;
|
||||
}
|
||||
|
||||
& #navigator-toolbox {
|
||||
--zen-toolbox-top-align: var(--zen-element-separation);
|
||||
& #urlbar {
|
||||
transform: translateY(-50%);
|
||||
transition: transform 0.1s ease-in-out;
|
||||
}
|
||||
|
||||
& #sidebar-box,
|
||||
& #titlebar,
|
||||
& #zen-appcontent-wrapper,
|
||||
& #zen-sidebar-web-panel-wrapper:has(#zen-sidebar-web-panel:not([pinned='true'])) {
|
||||
margin-top: var(--zen-element-separation) !important;
|
||||
@media (-moz-bool-pref: 'zen.view.compact.color-toolbar') {
|
||||
background-attachment: fixed;
|
||||
backdrop-filter: blur(5px);
|
||||
background: var(--zen-main-browser-background-toolbar);
|
||||
background-size: 100% 2000px;
|
||||
border-bottom: 1px solid var(--zen-colors-border);
|
||||
}
|
||||
}
|
||||
|
||||
& #zen-appcontent-wrapper {
|
||||
z-index: 3 !important;
|
||||
}
|
||||
& #zen-appcontent-navbar-container:hover,
|
||||
& #zen-appcontent-navbar-container[zen-has-hover],
|
||||
& #zen-appcontent-navbar-container:focus-within,
|
||||
& #zen-appcontent-navbar-container[zen-user-show],
|
||||
& #zen-appcontent-navbar-container[has-popup-menu],
|
||||
& #zen-appcontent-navbar-container:has(*:is([panelopen='true'], [open='true']):not(.zen-compact-mode-ignore)) {
|
||||
opacity: 1;
|
||||
border-top-width: 1px;
|
||||
|
||||
& #zen-sidebar-web-panel-wrapper:has(#zen-sidebar-web-panel[pinned='true']) {
|
||||
margin-top: calc(var(--zen-element-separation) * 2) !important;
|
||||
}
|
||||
top: -1px;
|
||||
overflow: initial;
|
||||
max-height: unset;
|
||||
|
||||
& #zen-appcontent-navbar-container {
|
||||
--zen-compact-toolbar-offset: 5px;
|
||||
position: absolute;
|
||||
top: calc((-1 * var(--zen-toolbar-height)) + var(--zen-element-separation) + 1px);
|
||||
left: 0;
|
||||
z-index: 20;
|
||||
box-shadow: 0 0 1px 1px rgba(0, 0, 0, 0.3) !important;
|
||||
border-bottom-left-radius: var(--zen-border-radius);
|
||||
border-bottom-right-radius: var(--zen-border-radius);
|
||||
border-top-left-radius: env(-moz-gtk-csd-titlebar-radius);
|
||||
border-top-right-radius: env(-moz-gtk-csd-titlebar-radius);
|
||||
transition: all 0.15s ease;
|
||||
width: 100%;
|
||||
opacity: 0;
|
||||
background: var(--zen-dialog-background);
|
||||
& #urlbar {
|
||||
transform: translateY(0);
|
||||
|
||||
max-height: var(--zen-toolbar-height);
|
||||
overflow: hidden;
|
||||
|
||||
& > * {
|
||||
position: relative !important;
|
||||
}
|
||||
|
||||
& #urlbar {
|
||||
transform: translateY(-50%);
|
||||
transition: transform 0.1s ease-in-out;
|
||||
}
|
||||
|
||||
@media (-moz-bool-pref: 'zen.view.compact.color-toolbar') {
|
||||
background-attachment: fixed;
|
||||
backdrop-filter: blur(5px);
|
||||
background: var(--zen-main-browser-background-toolbar);
|
||||
background-size: 100% 2000px;
|
||||
border-bottom: 1px solid var(--zen-colors-border);
|
||||
}
|
||||
}
|
||||
|
||||
& #zen-appcontent-navbar-container:hover,
|
||||
& #zen-appcontent-navbar-container[zen-has-hover],
|
||||
& #zen-appcontent-navbar-container:focus-within,
|
||||
& #zen-appcontent-navbar-container[zen-user-show],
|
||||
& #zen-appcontent-navbar-container[has-popup-menu],
|
||||
& #zen-appcontent-navbar-container:has(*:is([panelopen='true'], [open='true']):not(.zen-compact-mode-ignore)) {
|
||||
opacity: 1;
|
||||
border-top-width: 1px;
|
||||
|
||||
top: -1px;
|
||||
overflow: initial;
|
||||
max-height: unset;
|
||||
|
||||
& #urlbar {
|
||||
transform: translateY(0);
|
||||
|
||||
&[open]:not([zen-floating-urlbar='true']) {
|
||||
top: 0 !important;
|
||||
}
|
||||
&[open]:not([zen-floating-urlbar='true']) {
|
||||
top: 0 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#tabbrowser-tabpanels[zen-split-view='true'] {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
margin-top: calc(var(--zen-split-column-gap) / -2);
|
||||
margin-top: calc(var(--zen-split-column-gap) * -1);
|
||||
}
|
||||
|
||||
#tabbrowser-tabpanels[zen-split-view='true'] > *:not([zen-split='true']) {
|
||||
@@ -65,18 +65,10 @@
|
||||
|
||||
#tabbrowser-tabpanels:has(> [zen-split='true']),
|
||||
#zen-splitview-overlay {
|
||||
@media (-moz-bool-pref: 'zen.view.compact') {
|
||||
:root:not([customizing]) & {
|
||||
@media (-moz-bool-pref: 'zen.view.compact.hide-tabbar') {
|
||||
& {
|
||||
margin-left: 1px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (-moz-bool-pref: 'zen.view.compact.hide-toolbar') {
|
||||
& {
|
||||
margin-top: calc(var(--zen-split-column-gap) / -2);
|
||||
}
|
||||
:root:not([zen-compact-mode='true']):not([customizing]) & {
|
||||
@media (-moz-bool-pref: 'zen.view.compact.hide-toolbar') {
|
||||
& {
|
||||
margin-top: calc(var(--zen-split-column-gap) * -1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,8 +4,10 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
/* Zen Welcome idalog override */
|
||||
.dialogBox:not(.spotlightBox) {
|
||||
border: 1px solid var(--zen-colors-border);
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.dialogBox:not(.spotlightBox) {
|
||||
border: 1px solid var(--zen-colors-border);
|
||||
}
|
||||
}
|
||||
|
||||
#window-modal-dialog[zen-dialog-welcome-element='true'] .dialogBox:not(.spotlightBox) {
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
menupopup,
|
||||
panel {
|
||||
--panel-background: var(--arrowpanel-background);
|
||||
--panel-border-radius: var(--zen-panel-radius);
|
||||
--panel-border-radius: var(--zen-native-inner-radius);
|
||||
}
|
||||
|
||||
/* app menu */
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#zen-rice-share-dialog-notice {
|
||||
color: var(--panel-color);
|
||||
background: var(--arrowpanel-background);
|
||||
border-radius: var(--zen-panel-radius);
|
||||
border-radius: var(--zen-native-inner-radius);
|
||||
box-shadow: 0 0 1px 1px hsla(0, 0%, 0%, 0.2);
|
||||
border: var(--zen-appcontent-border);
|
||||
overflow: hidden;
|
||||
@@ -130,7 +130,7 @@
|
||||
background: rgba(255, 0, 0, 0.1);
|
||||
padding: 5px;
|
||||
transition: opacity 0.3s ease;
|
||||
border-radius: var(--zen-panel-radius);
|
||||
border-radius: var(--zen-native-inner-radius);
|
||||
|
||||
@starting-style {
|
||||
opacity: 0;
|
||||
|
||||
@@ -63,6 +63,7 @@
|
||||
max-width: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#zen-sidebar-web-panel-wrapper:has(#zen-sidebar-web-panel[pinned='true']) {
|
||||
@@ -79,9 +80,9 @@
|
||||
}
|
||||
|
||||
#zen-sidebar-web-panel {
|
||||
border-radius: var(--zen-panel-radius);
|
||||
border-radius: var(--zen-native-inner-radius);
|
||||
z-index: 2;
|
||||
box-shadow: 0 0 1px 1px rgba(0, 0, 0, 0.1);
|
||||
box-shadow: var(--zen-big-shadow);
|
||||
border: 1px solid var(--zen-colors-border);
|
||||
background: var(--zen-colors-tertiary);
|
||||
opacity: 0;
|
||||
@@ -101,7 +102,8 @@
|
||||
}
|
||||
|
||||
.zen-sidebar-web-panel-splitter,
|
||||
.zen-split-view-splitter[orient='vertical'] {
|
||||
.zen-split-view-splitter[orient='vertical'],
|
||||
#zen-sidebar-splitter {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
@@ -119,9 +121,9 @@
|
||||
}
|
||||
|
||||
&::before {
|
||||
height: 30px;
|
||||
width: 3px;
|
||||
background: var(--zen-colors-border);
|
||||
height: 50px;
|
||||
width: 4px;
|
||||
background: var(--zen-colors-primary);
|
||||
border-radius: 2px;
|
||||
content: '';
|
||||
position: absolute;
|
||||
@@ -181,10 +183,6 @@
|
||||
display: flex;
|
||||
}
|
||||
|
||||
#zen-sidebar-web-panel-wrapper {
|
||||
margin: 0 calc(var(--zen-element-separation) / 2) 0 var(--zen-element-separation);
|
||||
}
|
||||
|
||||
#zen-sidebar-web-panel[pinned='true'] {
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
@@ -288,19 +286,6 @@
|
||||
animation: better-sidebar-pinned-hide 0.15s ease-in-out forwards !important;
|
||||
}
|
||||
|
||||
#zen-sidebar-web-panel-wrapper:has(#zen-sidebar-web-panel:not([hidden='true'])) {
|
||||
:root:not([zen-right-side='true']) & {
|
||||
margin-right: calc(var(--zen-element-separation) * 2 - 3px) !important;
|
||||
}
|
||||
|
||||
@media (-moz-bool-pref: 'zen.view.compact') and (-moz-bool-pref: 'zen.view.compact.hide-tabbar') {
|
||||
:root[zen-right-side='true'] & {
|
||||
margin-left: 0 !important;
|
||||
margin-right: calc(var(--zen-element-separation) * 2 - 3px) !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** UNPINNED **/
|
||||
#zen-sidebar-web-panel {
|
||||
/* Sets perspective */
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
}
|
||||
|
||||
#browser {
|
||||
--zen-toolbox-padding: max(4px, calc(var(--zen-element-separation) / 1.5));
|
||||
--zen-toolbox-padding: max(5px, calc(var(--zen-element-separation) / 1.5));
|
||||
}
|
||||
|
||||
:root[zen-single-toolbar='true'] {
|
||||
@@ -228,7 +228,7 @@
|
||||
border-bottom: 0px solid transparent !important;
|
||||
|
||||
--tab-block-margin: 2px;
|
||||
--tab-selected-bgcolor: light-dark(rgba(255,255,255,.8), rgba(255,255,255,.25));
|
||||
--tab-selected-bgcolor: var(--zen-toolbar-element-bg);
|
||||
grid-gap: 0 !important;
|
||||
|
||||
&[overflow]::after,
|
||||
@@ -341,6 +341,7 @@
|
||||
padding-inline-end: 0 !important;
|
||||
display: flex !important;
|
||||
flex-direction: column;
|
||||
max-height: calc(100vh - 12 * (var(--tab-min-height) + 2 * var(--tab-block-margin))) !important;
|
||||
|
||||
& .tabbrowser-tab:not(:hover) .tab-background:not([selected]):not([multiselected]) {
|
||||
background: transparent !important;
|
||||
@@ -360,6 +361,7 @@
|
||||
/* Mark: toolbox as expanded */
|
||||
#navigator-toolbox[zen-sidebar-expanded='true'] {
|
||||
--zen-toolbox-min-width: fit-content;
|
||||
|
||||
--tab-icon-end-margin: 8.5px;
|
||||
padding: var(--zen-toolbox-padding);
|
||||
padding-left: 0;
|
||||
@@ -381,15 +383,10 @@
|
||||
padding-right: 0;
|
||||
|
||||
:root[zen-single-toolbar='true'] & {
|
||||
margin-left: var(--zen-toolbox-padding);
|
||||
& #urlbar:not([breakout-extend='true']) .urlbar-input-container {
|
||||
padding-left: 4px;
|
||||
padding-right: 4px;
|
||||
}
|
||||
|
||||
:root[zen-right-side='true'] & {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -443,9 +440,7 @@
|
||||
|
||||
&:not([zen-right-side='true']) {
|
||||
padding-right: 0;
|
||||
& #titlebar {
|
||||
padding-left: var(--zen-toolbox-padding);
|
||||
}
|
||||
padding-left: var(--zen-toolbox-padding);
|
||||
}
|
||||
|
||||
& #TabsToolbar-customization-target {
|
||||
@@ -502,11 +497,6 @@
|
||||
}
|
||||
|
||||
& .tab-background {
|
||||
@media not (prefers-color-scheme: dark) {
|
||||
&:is([selected], [multiselected]) {
|
||||
box-shadow: 0 .5px 1px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
}
|
||||
margin-inline: var(--tab-block-margin);
|
||||
width: -moz-available;
|
||||
}
|
||||
@@ -614,13 +604,6 @@
|
||||
margin: 0 auto;
|
||||
& .tab-background {
|
||||
margin-inline: auto !important;
|
||||
&:is([selected], [multiselected]) {
|
||||
box-shadow: 0 0 1px 1px rgba(0,0,0,.1);
|
||||
|
||||
@media not (prefers-color-scheme: dark) {
|
||||
box-shadow: 0 0 1px 1px rgba(0, 0, 0, 0.12) !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
& .tab-reset-button {
|
||||
display: none !important;
|
||||
@@ -695,10 +678,6 @@
|
||||
transition: opacity 0.2s ease-in-out;
|
||||
background: var(--zen-colors-border);
|
||||
appearance: none;
|
||||
|
||||
&:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* Mark: Move sidebar to the right */
|
||||
@@ -812,6 +791,14 @@
|
||||
|
||||
:root[zen-single-toolbar='true'] & {
|
||||
--toolbarbutton-inner-padding: calc(var(--zen-toolbar-button-inner-padding) - 2px) !important;
|
||||
|
||||
& #PanelUI-button {
|
||||
order: -2;
|
||||
}
|
||||
|
||||
& #unified-extensions-button {
|
||||
order: -1;
|
||||
}
|
||||
}
|
||||
|
||||
& #zen-sidebar-top-buttons-customization-target {
|
||||
@@ -851,6 +838,7 @@
|
||||
|
||||
#tabs-newtab-button {
|
||||
display: none;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
@media (-moz-bool-pref: 'zen.tabs.show-newtab-vertical') {
|
||||
@@ -917,6 +905,8 @@
|
||||
width: 100% !important;
|
||||
border-radius: var(--border-radius-medium);
|
||||
|
||||
--tab-selected-bgcolor: light-dark(rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.2));
|
||||
|
||||
&[selected] .tab-background {
|
||||
box-shadow: 0 0 1px 1px light-dark(rgba(0, 0, 0, 0.07), rgba(0, 0, 0, 0.1));
|
||||
}
|
||||
@@ -924,7 +914,7 @@
|
||||
&:not([selected], [multiselected="true"]) .tab-background {
|
||||
background: var(--zen-toolbar-element-bg);
|
||||
backdrop-filter: none !important;
|
||||
border: 1px solid light-dark(transparent, rgba(255, 255, 255, 0.05));
|
||||
border: none;
|
||||
}
|
||||
|
||||
& .tab-content {
|
||||
@@ -960,9 +950,10 @@
|
||||
|
||||
background: transparent;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
|
||||
&::before {
|
||||
background: light-dark(rgba(255, 255, 255, 0.8), rgba(68, 64, 64, 0.80));
|
||||
background: light-dark(rgba(255, 255, 255, 0.75), rgba(68, 64, 64, 0.75));
|
||||
margin: 2px;
|
||||
border-radius: calc(var(--tab-border-radius) - 2px);
|
||||
position: absolute;
|
||||
@@ -974,7 +965,7 @@
|
||||
}
|
||||
|
||||
&[selected]:hover .tab-background::before {
|
||||
background: light-dark(rgba(255, 255, 255, 0.8), rgba(68, 64, 64, 0.85));
|
||||
background: light-dark(rgba(255, 255, 255, 0.70), rgba(68, 64, 64, 0.70));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -983,8 +974,8 @@
|
||||
/* Very special occasions */
|
||||
|
||||
/* Mark: Right side windows controls with collapsed sidebar */
|
||||
@media not (-moz-bool-pref: 'zen.view.compact') {
|
||||
:root[zen-right-side='true']:not([zen-sidebar-expanded='true']):not([zen-window-buttons-reversed='true']) {
|
||||
:root:not([zen-compact-mode='true']) {
|
||||
&[zen-right-side='true']:not([zen-sidebar-expanded='true']):not([zen-window-buttons-reversed='true']) {
|
||||
& #navigator-toolbox {
|
||||
margin-top: var(--zen-toolbar-height) !important;
|
||||
}
|
||||
@@ -1008,7 +999,7 @@
|
||||
%include vertical-tabs-topbuttons-fix.css
|
||||
}
|
||||
|
||||
:root:not([zen-right-side='true']):not([zen-sidebar-expanded='true'])[zen-window-buttons-reversed='true'] {
|
||||
&:not([zen-right-side='true']):not([zen-sidebar-expanded='true'])[zen-window-buttons-reversed='true'] {
|
||||
& #navigator-toolbox {
|
||||
margin-top: var(--zen-toolbar-height) !important;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
--zen-primary-color: #ffb787;
|
||||
|
||||
/* Branding */
|
||||
--zen-branding-dark: #202020;
|
||||
--zen-branding-dark: #1d1d1d;
|
||||
--zen-branding-coral: #f76f53;
|
||||
--zen-branding-paper: #ebebeb;
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
--zen-colors-hover-bg: color-mix(in srgb, var(--zen-primary-color) 90%, white 10%);
|
||||
--zen-colors-primary-foreground: var(--zen-branding-bg-reverse);
|
||||
--zen-colors-border: color-mix(in srgb, var(--zen-colors-secondary) 97%, black 3%);
|
||||
--zen-colors-border-contrast: color-mix(in srgb, var(--zen-colors-secondary) 10%, rgba(181, 181, 181, 0.11) 90%);
|
||||
|
||||
--zen-colors-input-bg: color-mix(in srgb, var(--zen-primary-color) 1%, var(--zen-colors-tertiary) 99%);
|
||||
|
||||
@@ -103,7 +104,7 @@
|
||||
--zen-button-border-radius: 5px;
|
||||
--zen-button-padding: 0.6rem 1.2rem;
|
||||
|
||||
--zen-toolbar-element-bg: light-dark(rgba(255, 255, 255, 0.65), rgba(170, 170, 170, 0.2));
|
||||
--zen-toolbar-element-bg: light-dark(rgba(0, 0, 0, 0.06), rgba(255, 255, 255, 0.11));
|
||||
|
||||
/* Toolbar */
|
||||
--zen-toolbar-height: 38px;
|
||||
@@ -126,7 +127,6 @@
|
||||
--browser-area-z-index-toolbox: 2 !important;
|
||||
|
||||
--zen-appcontent-border: 1px solid var(--zen-colors-border);
|
||||
--zen-panel-radius: var(--zen-border-radius);
|
||||
|
||||
--toolbarbutton-border-radius: 6px;
|
||||
--urlbar-margin-inline: 1px !important;
|
||||
@@ -153,8 +153,8 @@
|
||||
|
||||
--input-bgcolor: var(--zen-colors-tertiary) !important;
|
||||
--input-border-color: var(--zen-input-border-color) !important;
|
||||
--zen-themed-toolbar-bg: light-dark(var(--zen-branding-bg), var(--zen-colors-tertiary));
|
||||
--zen-themed-toolbar-bg-transparent: light-dark(var(--zen-branding-bg), var(--zen-colors-tertiary));
|
||||
--zen-themed-toolbar-bg: light-dark(var(--zen-branding-bg), #161616);
|
||||
--zen-themed-toolbar-bg-transparent: light-dark(var(--zen-branding-bg), #161616);
|
||||
|
||||
@media (-moz-windows-mica) or (-moz-platform: macos) {
|
||||
background: transparent;
|
||||
@@ -168,7 +168,30 @@
|
||||
--toolbar-field-background-color: var(--zen-colors-input-bg) !important;
|
||||
--arrowpanel-background: var(--zen-dialog-background) !important;
|
||||
|
||||
--tab-selected-shadow: 0 0 1px 1px rgba(0, 0, 0, 0.1) !important;
|
||||
--tab-selected-shadow: none !important;
|
||||
--zen-big-shadow: 0 0 9.73px 0px light-dark(rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.25));
|
||||
|
||||
/* Nativity */
|
||||
--zen-native-content-radius: env(-moz-gtk-csd-titlebar-radius, var(--zen-border-radius));
|
||||
--zen-native-inner-radius: var(
|
||||
--zen-webview-border-radius,
|
||||
/* Inner radius calculation:
|
||||
* 1. If the native radius - the separation is less than 4px, use 4px.
|
||||
* 2. Otherwise, use the the calculated value (inner radius = outer radius - separation).
|
||||
*/
|
||||
max(4px, calc(var(--zen-native-content-radius) - var(--zen-element-separation)))
|
||||
);
|
||||
|
||||
/** Other theme-related styles */
|
||||
font-family:
|
||||
SF Pro,
|
||||
ui-sans-serif,
|
||||
system-ui,
|
||||
sans-serif,
|
||||
Apple Color Emoji,
|
||||
Segoe UI Emoji,
|
||||
Segoe UI Symbol,
|
||||
Noto Color Emoji;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
@@ -184,7 +207,8 @@
|
||||
--zen-colors-primary-foreground: color-mix(in srgb, var(--zen-primary-color) 80%, white 20%);
|
||||
|
||||
--zen-colors-input-bg: color-mix(in srgb, var(--zen-primary-color) 1%, var(--zen-dark-color-mix-base) 99%);
|
||||
--zen-colors-border: color-mix(in srgb, var(--zen-colors-secondary) 20%, rgb(43, 43, 43) 80%);
|
||||
--zen-colors-border: color-mix(in srgb, var(--zen-colors-secondary) 20%, rgb(53, 53, 53) 80%);
|
||||
--zen-colors-border-contrast: color-mix(in srgb, var(--zen-colors-secondary) 10%, rgba(255, 255, 255, 0.11) 90%);
|
||||
|
||||
--zen-dialog-background: var(--zen-dark-color-mix-base);
|
||||
--zen-urlbar-background: color-mix(in srgb, var(--zen-primary-color) 4%, rgb(24, 24, 24) 96%);
|
||||
|
||||
@@ -32,13 +32,10 @@
|
||||
}
|
||||
|
||||
#urlbar-background {
|
||||
border: 1px solid light-dark(transparent, rgba(255, 255, 255, 0.1)) !important;
|
||||
border: none !important;
|
||||
margin: 1px;
|
||||
|
||||
box-shadow: 0 0 1px 1px rgba(0, 0, 0, 0.1) !important;
|
||||
:root[zen-single-toolbar='true'] & {
|
||||
box-shadow: none !important;
|
||||
}
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
#urlbar[focused='true']:not([suppress-focus-border]) > #urlbar-background,
|
||||
@@ -50,7 +47,7 @@
|
||||
|
||||
#identity-box.chromeUI:not([pageproxystate='invalid']) {
|
||||
& #identity-icon-box {
|
||||
background: light-dark(rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1)) !important;
|
||||
background: light-dark(rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.1)) !important;
|
||||
}
|
||||
|
||||
& #identity-icon-label {
|
||||
@@ -122,10 +119,11 @@
|
||||
|
||||
#urlbar[breakout-extend='true'] #urlbar-background {
|
||||
border: 1px solid var(--zen-colors-border) !important;
|
||||
box-shadow: var(--zen-big-shadow) !important;
|
||||
}
|
||||
|
||||
:root[zen-single-toolbar='true'] {
|
||||
.urlbar-page-action:not(#star-button-box):not([open]),
|
||||
.urlbar-page-action:not([open]),
|
||||
#tracking-protection-icon-container {
|
||||
margin-inline-end: calc(-16px - 2 * var(--urlbar-icon-padding)) !important;
|
||||
opacity: 0;
|
||||
@@ -372,9 +370,6 @@ button.popup-notification-dropmarker {
|
||||
the backdrop woudn't work, we would need to apply a clip-path to the site and that's not recommended
|
||||
due to performance issues */
|
||||
background-color: light-dark(rgb(247, 247, 247), var(--zen-branding-bg)) !important;
|
||||
box-shadow: 0 0 1px 1px light-dark(rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.1)) !important;
|
||||
outline: 1px solid light-dark(rgba(20, 20, 20, 0.2), rgba(235, 235, 235, 0.2)) !important;
|
||||
outline-offset: -1px !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,10 +20,10 @@ var gZenCompactModeManager = {
|
||||
_removeHoverFrames: {},
|
||||
|
||||
init() {
|
||||
Services.prefs.addObserver('zen.view.compact', this._updateEvent.bind(this));
|
||||
Services.prefs.addObserver('zen.view.sidebar-expanded.on-hover', this._disableTabsOnHoverIfConflict.bind(this));
|
||||
Services.prefs.addObserver('zen.tabs.vertical.right-side', this._updateSidebarIsOnRight.bind(this));
|
||||
|
||||
ChromeUtils.defineLazyGetter(this, 'mainAppWrapper', () => document.getElementById('zen-main-app-wrapper'));
|
||||
|
||||
this._canAnimateSidebar = Services.prefs.getBoolPref('zen.view.compact.animate-sidebar', true);
|
||||
|
||||
gZenUIManager.addPopupTrackingAttribute(this.sidebar);
|
||||
@@ -33,12 +33,22 @@ var gZenCompactModeManager = {
|
||||
this.addContextMenu();
|
||||
},
|
||||
|
||||
get prefefence() {
|
||||
return Services.prefs.getBoolPref('zen.view.compact');
|
||||
get preference() {
|
||||
if (!document.documentElement.hasAttribute('zen-compact-mode')) {
|
||||
document.documentElement.setAttribute('zen-compact-mode', this.mainAppWrapper.getAttribute('zen-compact-mode'));
|
||||
}
|
||||
return this.mainAppWrapper.getAttribute('zen-compact-mode') === 'true';
|
||||
},
|
||||
|
||||
set preference(value) {
|
||||
Services.prefs.setBoolPref('zen.view.compact', value);
|
||||
if (this.preference === value) {
|
||||
return value;
|
||||
}
|
||||
// We use this element in order to make it persis across restarts, by using the XULStore.
|
||||
// main-window can't store attributes other than window sizes, so we use this instead
|
||||
this.mainAppWrapper.setAttribute('zen-compact-mode', value);
|
||||
document.documentElement.setAttribute('zen-compact-mode', value);
|
||||
this._updateEvent();
|
||||
return value;
|
||||
},
|
||||
|
||||
@@ -58,7 +68,7 @@ var gZenCompactModeManager = {
|
||||
},
|
||||
|
||||
flashSidebarIfNecessary(aInstant = false) {
|
||||
if (!aInstant && this.prefefence && lazyCompactMode.COMPACT_MODE_FLASH_ENABLED && !gZenGlanceManager._animating) {
|
||||
if (!aInstant && this.preference && lazyCompactMode.COMPACT_MODE_FLASH_ENABLED && !gZenGlanceManager._animating) {
|
||||
this.flashSidebar();
|
||||
}
|
||||
},
|
||||
@@ -113,7 +123,6 @@ var gZenCompactModeManager = {
|
||||
|
||||
_updateEvent() {
|
||||
this._evenListeners.forEach((callback) => callback());
|
||||
this._disableTabsOnHoverIfConflict();
|
||||
this.updateContextMenu();
|
||||
this.animateCompactMode();
|
||||
},
|
||||
@@ -127,12 +136,8 @@ var gZenCompactModeManager = {
|
||||
},
|
||||
|
||||
animateCompactMode() {
|
||||
const isCompactMode = this.prefefence;
|
||||
const isCompactMode = this.preference;
|
||||
const canHideSidebar = Services.prefs.getBoolPref('zen.view.compact.hide-tabbar');
|
||||
if (this._isAnimating) {
|
||||
return;
|
||||
}
|
||||
this._isAnimating = true;
|
||||
// Do this so we can get the correct width ONCE compact mode styled have been applied
|
||||
if (this._canAnimateSidebar) {
|
||||
this.sidebar.setAttribute('animate', 'true');
|
||||
@@ -141,80 +146,70 @@ var gZenCompactModeManager = {
|
||||
let sidebarWidth = this.getAndApplySidebarWidth();
|
||||
if (!this._canAnimateSidebar) {
|
||||
this.sidebar.removeAttribute('animate');
|
||||
this._isAnimating = false;
|
||||
return;
|
||||
}
|
||||
if (canHideSidebar && isCompactMode) {
|
||||
window.requestAnimationFrame(() => {
|
||||
this.sidebar.style.position = 'unset';
|
||||
this.sidebar.style.transition = 'margin .4s ease';
|
||||
this.sidebar.style.left = '0';
|
||||
if (!this.sidebarIsOnRight) {
|
||||
this.sidebar.style.marginLeft = `${-1 * sidebarWidth}px`;
|
||||
} else {
|
||||
this.sidebar.style.marginRight = `${-1 * sidebarWidth}px`;
|
||||
}
|
||||
this.sidebar.style.pointerEvents = 'none';
|
||||
|
||||
window.requestAnimationFrame(() => {
|
||||
gZenUIManager.motion
|
||||
.animate(
|
||||
this.sidebar,
|
||||
this.sidebarIsOnRight
|
||||
? {
|
||||
marginRight: `-${sidebarWidth}px`,
|
||||
}
|
||||
: { marginLeft: `-${sidebarWidth}px` },
|
||||
{
|
||||
ease: 'easeIn',
|
||||
type: 'spring',
|
||||
stiffness: 3000,
|
||||
damping: 150,
|
||||
mass: 1,
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
this.sidebar.removeAttribute('animate');
|
||||
this.sidebar.style.transition = 'none';
|
||||
this.sidebar.style.removeProperty('margin-right');
|
||||
this.sidebar.style.removeProperty('margin-left');
|
||||
this.sidebar.style.removeProperty('transform');
|
||||
setTimeout(() => {
|
||||
window.requestAnimationFrame(() => {
|
||||
this.sidebar.style.removeProperty('pointer-events');
|
||||
this.sidebar.style.removeProperty('position');
|
||||
this.sidebar.style.removeProperty('margin-left');
|
||||
this.sidebar.style.removeProperty('margin-right');
|
||||
this.sidebar.style.removeProperty('transform');
|
||||
this.sidebar.style.removeProperty('left');
|
||||
document.getElementById('browser').style.removeProperty('overflow');
|
||||
this.sidebar.removeAttribute('animate');
|
||||
window.requestAnimationFrame(() => {
|
||||
this.sidebar.style.removeProperty('transition');
|
||||
this._isAnimating = false;
|
||||
});
|
||||
});
|
||||
}, 450);
|
||||
this.sidebar.style.removeProperty('transition');
|
||||
});
|
||||
});
|
||||
});
|
||||
} else if (canHideSidebar && !isCompactMode) {
|
||||
document.getElementById('browser').style.overflow = 'hidden';
|
||||
this.sidebar.style.position = 'relative';
|
||||
this.sidebar.style.left = '0';
|
||||
|
||||
if (!this.sidebarIsOnRight) {
|
||||
this.sidebar.style.marginLeft = `${-1 * sidebarWidth}px`;
|
||||
if (this.sidebarIsOnRight) {
|
||||
this.sidebar.style.marginRight = `-${sidebarWidth}px`;
|
||||
} else {
|
||||
this.sidebar.style.marginRight = `${-1 * sidebarWidth}px`;
|
||||
this.sidebar.style.transform = `translateX(${sidebarWidth}px)`;
|
||||
this.sidebar.style.marginLeft = `-${sidebarWidth}px`;
|
||||
}
|
||||
|
||||
window.requestAnimationFrame(() => {
|
||||
this.sidebar.style.transition = 'margin .3s ease, transform .275s ease, opacity .3s ease';
|
||||
// we are in compact mode and we are exiting it
|
||||
if (!this.sidebarIsOnRight) {
|
||||
this.sidebar.style.marginLeft = '0';
|
||||
} else {
|
||||
this.sidebar.style.marginRight = '0';
|
||||
this.sidebar.style.transform = 'translateX(0)';
|
||||
}
|
||||
this.sidebar.style.pointerEvents = 'none';
|
||||
|
||||
setTimeout(() => {
|
||||
window.requestAnimationFrame(() => {
|
||||
this._isAnimating = false;
|
||||
this.sidebar.style.removeProperty('position');
|
||||
this.sidebar.style.removeProperty('pointer-events');
|
||||
this.sidebar.style.removeProperty('opacity');
|
||||
this.sidebar.style.removeProperty('margin-left');
|
||||
this.sidebar.style.removeProperty('margin-right');
|
||||
this.sidebar.style.removeProperty('transform');
|
||||
gZenUIManager.motion
|
||||
.animate(
|
||||
this.sidebar,
|
||||
this.sidebarIsOnRight
|
||||
? {
|
||||
marginRight: 0,
|
||||
transform: ['translateX(100%)', 'translateX(0)'],
|
||||
}
|
||||
: { marginLeft: 0 },
|
||||
{
|
||||
ease: 'easeOut',
|
||||
type: 'spring',
|
||||
stiffness: 3000,
|
||||
damping: 150,
|
||||
mass: 1,
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
this.sidebar.removeAttribute('animate');
|
||||
document.getElementById('browser').style.removeProperty('overflow');
|
||||
this.sidebar.style.transition = 'none';
|
||||
this.sidebar.style.removeProperty('margin-right');
|
||||
this.sidebar.style.removeProperty('margin-left');
|
||||
this.sidebar.style.removeProperty('transform');
|
||||
setTimeout(() => {
|
||||
this.sidebar.style.removeProperty('transition');
|
||||
this.sidebar.style.removeProperty('left');
|
||||
|
||||
document.getElementById('browser').style.removeProperty('overflow');
|
||||
this.sidebar.removeAttribute('animate');
|
||||
});
|
||||
}, 400);
|
||||
});
|
||||
});
|
||||
} else {
|
||||
this.sidebar.removeAttribute('animate'); // remove the attribute if we are not animating
|
||||
}
|
||||
@@ -222,9 +217,7 @@ var gZenCompactModeManager = {
|
||||
},
|
||||
|
||||
updateContextMenu() {
|
||||
document
|
||||
.getElementById('zen-context-menu-compact-mode-toggle')
|
||||
.setAttribute('checked', Services.prefs.getBoolPref('zen.view.compact'));
|
||||
document.getElementById('zen-context-menu-compact-mode-toggle').setAttribute('checked', this.preference);
|
||||
|
||||
const hideTabBar = Services.prefs.getBoolPref('zen.view.compact.hide-tabbar');
|
||||
const hideToolbar = Services.prefs.getBoolPref('zen.view.compact.hide-toolbar');
|
||||
@@ -244,14 +237,8 @@ var gZenCompactModeManager = {
|
||||
}
|
||||
},
|
||||
|
||||
_disableTabsOnHoverIfConflict() {
|
||||
if (Services.prefs.getBoolPref('zen.view.compact') && Services.prefs.getBoolPref('zen.view.compact.hide-tabbar')) {
|
||||
Services.prefs.setBoolPref('zen.view.sidebar-expanded.on-hover', false);
|
||||
}
|
||||
},
|
||||
|
||||
toggle() {
|
||||
return (this.preference = !this.prefefence);
|
||||
return (this.preference = !this.preference);
|
||||
},
|
||||
|
||||
_updateSidebarIsOnRight() {
|
||||
@@ -274,7 +261,7 @@ var gZenCompactModeManager = {
|
||||
{
|
||||
element: this.sidebar,
|
||||
screenEdge: this.sidebarIsOnRight ? 'right' : 'left',
|
||||
keepHoverDuration: 300,
|
||||
keepHoverDuration: 100,
|
||||
},
|
||||
{
|
||||
element: document.getElementById('zen-appcontent-navbar-container'),
|
||||
@@ -316,6 +303,7 @@ var gZenCompactModeManager = {
|
||||
for (let i = 0; i < this.hoverableElements.length; i++) {
|
||||
let target = this.hoverableElements[i].element;
|
||||
target.addEventListener('mouseenter', (event) => {
|
||||
if (!event.target.matches(':hover')) return;
|
||||
this.clearFlashTimeout('has-hover' + target.id);
|
||||
window.requestAnimationFrame(() => target.setAttribute('zen-has-hover', 'true'));
|
||||
});
|
||||
|
||||
@@ -659,7 +659,7 @@
|
||||
// Reactivate the transition after the animation
|
||||
appWrapper.removeAttribute('post-animating');
|
||||
}, 100);
|
||||
}, 700);
|
||||
}, 500);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -47,10 +47,11 @@
|
||||
}
|
||||
|
||||
class ZenPinnedTabManager extends ZenDOMOperatedFeature {
|
||||
init() {
|
||||
async init() {
|
||||
if (!this.enabled) {
|
||||
return;
|
||||
}
|
||||
this._canLog = Services.prefs.getBoolPref('zen.pinned-tab-manager.debug', false);
|
||||
this.observer = new ZenPinnedTabsObserver();
|
||||
this._initClosePinnedTabShortcut();
|
||||
this._insertItemsIntoTabContextMenu();
|
||||
@@ -58,6 +59,9 @@
|
||||
|
||||
this._zenClickEventListener = this._onTabClick.bind(this);
|
||||
ZenWorkspaces.addChangeListeners(this.onWorkspaceChange.bind(this));
|
||||
|
||||
await ZenPinnedTabsStorage.promiseInitialized;
|
||||
ZenWorkspaces._resolvePinnedInitialized();
|
||||
}
|
||||
|
||||
async onWorkspaceChange(newWorkspace, onInit) {
|
||||
@@ -68,6 +72,12 @@
|
||||
await this._refreshPinnedTabs(newWorkspace, { init: onInit });
|
||||
}
|
||||
|
||||
log(message) {
|
||||
if (this._canLog) {
|
||||
console.log(`[ZenPinnedTabManager] ${message}`);
|
||||
}
|
||||
}
|
||||
|
||||
onTabIconChanged(tab, url = null) {
|
||||
const iconUrl = url ?? tab.iconImage.src;
|
||||
if (tab.hasAttribute('zen-essential')) {
|
||||
@@ -125,6 +135,7 @@
|
||||
this._pinsCache = [];
|
||||
}
|
||||
|
||||
this.log(`Initialized pins cache with ${this._pinsCache.length} pins`);
|
||||
return this._pinsCache;
|
||||
}
|
||||
|
||||
@@ -221,6 +232,7 @@
|
||||
SessionStore.setTabState(newTab, state);
|
||||
}
|
||||
|
||||
this.log(`Created new pinned tab for pin ${pin.uuid} (isEssential: ${pin.isEssential})`);
|
||||
gBrowser.pinTab(newTab);
|
||||
|
||||
newTab.initialize();
|
||||
@@ -369,6 +381,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
this.log(`Setting pinned attributes for tab ${tab.linkedBrowser.currentURI.spec}`);
|
||||
const browser = tab.linkedBrowser;
|
||||
|
||||
const uuid = gZenUIManager.generateUuidv4();
|
||||
@@ -406,6 +419,11 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if (Services.startup.shuttingDown || window.skipNextCanClose) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.log(`Removing pinned attributes for tab ${tab.getAttribute('zen-pin-id')}`);
|
||||
await ZenPinnedTabsStorage.removePin(tab.getAttribute('zen-pin-id'));
|
||||
|
||||
if (!isClosing) {
|
||||
|
||||
@@ -45,6 +45,9 @@ var ZenPinnedTabsStorage = {
|
||||
await db.execute(`
|
||||
CREATE INDEX IF NOT EXISTS idx_zen_pins_changes_uuid ON zen_pins_changes(uuid)
|
||||
`);
|
||||
|
||||
await SessionStore.promiseInitialized;
|
||||
this._resolveInitialized();
|
||||
});
|
||||
},
|
||||
|
||||
@@ -357,4 +360,7 @@ var ZenPinnedTabsStorage = {
|
||||
},
|
||||
};
|
||||
|
||||
ZenPinnedTabsStorage.init();
|
||||
ZenPinnedTabsStorage.promiseInitialized = new Promise((resolve) => {
|
||||
ZenPinnedTabsStorage._resolveInitialized = resolve;
|
||||
ZenPinnedTabsStorage.init();
|
||||
});
|
||||
|
||||
@@ -219,7 +219,7 @@
|
||||
}
|
||||
|
||||
unload(tab) {
|
||||
gBrowser.discardBrowser(tab);
|
||||
gBrowser.explicitUnloadTabs([tab]);
|
||||
tab.removeAttribute('linkedpanel');
|
||||
}
|
||||
|
||||
|
||||
@@ -1,176 +0,0 @@
|
||||
const kZenAccentColorConfigKey = 'zen.theme.accent-color';
|
||||
|
||||
var gZenThemeBuilder = {
|
||||
init() {
|
||||
return; // TODO:
|
||||
this._mouseMoveListener = this._handleThumbMouseMove.bind(this);
|
||||
setTimeout(() => {
|
||||
this._initBuilderUI();
|
||||
}, 500);
|
||||
},
|
||||
|
||||
get _builderWrapper() {
|
||||
if (this.__builderWrapper) {
|
||||
return this.__builderWrapper;
|
||||
}
|
||||
this.__builderWrapper = document.getElementById('zen-theme-builder-wrapper');
|
||||
return this.__builderWrapper;
|
||||
},
|
||||
|
||||
_initBuilderUI() {
|
||||
let wrapper = this._builderWrapper;
|
||||
if (!wrapper) {
|
||||
return;
|
||||
}
|
||||
|
||||
console.info('gZenThemeBuilder: init builder UI');
|
||||
|
||||
const kTemplate = `
|
||||
<html:div id="zen-theme-builder">
|
||||
<html:div id="zen-theme-builder-color-picker">
|
||||
<html:canvas id="zen-theme-builder-color-picker-canvas"></html:canvas>
|
||||
<html:div id="zen-theme-builder-color-picker-deck">
|
||||
<html:div id="zen-theme-builder-color-picker-thumb"></html:div>
|
||||
</html:div>
|
||||
</html:div>
|
||||
</html:div>
|
||||
`;
|
||||
wrapper.innerHTML = kTemplate;
|
||||
this._initColorPicker();
|
||||
},
|
||||
|
||||
_getPositionFromColor(ctx, color) {
|
||||
var w = ctx.canvas.width,
|
||||
h = ctx.canvas.height,
|
||||
data = ctx.getImageData(0, 0, w, h), /// get image data
|
||||
buffer = data.data, /// and its pixel buffer
|
||||
len = buffer.length, /// cache length
|
||||
x,
|
||||
y = 0,
|
||||
p,
|
||||
px; /// for iterating
|
||||
/// iterating x/y instead of forward to get position the easy way
|
||||
for (; y < h; y++) {
|
||||
/// common value for all x
|
||||
p = y * 4 * w;
|
||||
for (x = 0; x < w; x++) {
|
||||
/// next pixel (skipping 4 bytes as each pixel is RGBA bytes)
|
||||
px = p + x * 4;
|
||||
/// if red component match check the others
|
||||
if (buffer[px] === color[0]) {
|
||||
if (buffer[px + 1] === color[1] && buffer[px + 2] === color[2]) {
|
||||
return [x, y];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
},
|
||||
|
||||
_hexToRgb(hex) {
|
||||
var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
||||
return [parseInt(result[1], 16), parseInt(result[2], 16), parseInt(result[3], 16)];
|
||||
},
|
||||
|
||||
_componentToHex(c) {
|
||||
var hex = c.toString(16);
|
||||
return hex.length == 1 ? '0' + hex : hex;
|
||||
},
|
||||
|
||||
_rgbToHex(r, g, b) {
|
||||
return '#' + this._componentToHex(r) + this._componentToHex(g) + this._componentToHex(b);
|
||||
},
|
||||
|
||||
_initColorPicker() {
|
||||
const canvas = document.getElementById('zen-theme-builder-color-picker-canvas');
|
||||
const thumb = document.getElementById('zen-theme-builder-color-picker-thumb');
|
||||
|
||||
// A all the main colors are all blended together towards the center.
|
||||
// But we also add some random gradients to make it look more interesting.
|
||||
// Instead of using a simple gradient, we use a radial gradient.
|
||||
const ctx = canvas.getContext('2d');
|
||||
const size = 180;
|
||||
canvas.width = size;
|
||||
canvas.height = size;
|
||||
const center = size / 2;
|
||||
const radius = size / 2;
|
||||
const gradient = ctx.createConicGradient(0, center, center);
|
||||
gradient.addColorStop(0, '#fff490');
|
||||
gradient.addColorStop(1 / 12, '#f9e380');
|
||||
gradient.addColorStop(2 / 12, '#fecc87');
|
||||
gradient.addColorStop(3 / 12, '#ffa894');
|
||||
gradient.addColorStop(4 / 12, '#f98089');
|
||||
gradient.addColorStop(5 / 12, '#f9b7c5');
|
||||
gradient.addColorStop(6 / 12, '#c193b8');
|
||||
gradient.addColorStop(7 / 12, '#a8b7e0');
|
||||
gradient.addColorStop(8 / 12, '#88d2f9');
|
||||
gradient.addColorStop(9 / 12, '#81e8e5');
|
||||
gradient.addColorStop(10 / 12, '#b7e5a5');
|
||||
gradient.addColorStop(11 / 12, '#eaefac');
|
||||
gradient.addColorStop(1, '#fff490');
|
||||
|
||||
const radialGradient = ctx.createRadialGradient(size / 2, size / 2, 0, size / 2, size / 2, size / 2);
|
||||
radialGradient.addColorStop(0, 'rgba(255,255,255,1)');
|
||||
radialGradient.addColorStop(1, 'rgba(255,255,255,0)');
|
||||
|
||||
ctx.fillStyle = gradient;
|
||||
ctx.fillRect(0, 0, size, size);
|
||||
|
||||
//ctx.fillStyle = radialGradient;
|
||||
//ctx.fillRect(0, 0, size, size);
|
||||
|
||||
// Add the thumb.
|
||||
const accentColor = Services.prefs.getStringPref(kZenAccentColorConfigKey, '#ffb787');
|
||||
const pos = this._getPositionFromColor(ctx, this._hexToRgb(accentColor));
|
||||
|
||||
let x = pos ? pos[0] : center;
|
||||
let y = pos ? pos[1] : center;
|
||||
|
||||
thumb.style.left = `${x}px`;
|
||||
thumb.style.top = `${y}px`;
|
||||
|
||||
thumb.addEventListener('mousedown', this._handleThumbMouseDown.bind(this));
|
||||
document.addEventListener('mouseup', this._handleThumbMouseUp.bind(this));
|
||||
},
|
||||
|
||||
_handleThumbMouseDown(e) {
|
||||
document.addEventListener('mousemove', this._mouseMoveListener);
|
||||
},
|
||||
|
||||
_handleThumbMouseUp(e) {
|
||||
document.removeEventListener('mousemove', this._mouseMoveListener);
|
||||
},
|
||||
|
||||
_handleThumbMouseMove(e) {
|
||||
const kThumbOffset = 15;
|
||||
const deck = document.getElementById('zen-theme-builder-color-picker-deck');
|
||||
|
||||
const thumb = document.getElementById('zen-theme-builder-color-picker-thumb');
|
||||
const rect = deck.getBoundingClientRect();
|
||||
let x = e.clientX - rect.left;
|
||||
let y = e.clientY - rect.top;
|
||||
|
||||
if (x > rect.width - kThumbOffset) {
|
||||
x = rect.width - kThumbOffset;
|
||||
}
|
||||
if (y > rect.height - kThumbOffset) {
|
||||
y = rect.height - kThumbOffset;
|
||||
}
|
||||
if (x < kThumbOffset) {
|
||||
x = kThumbOffset;
|
||||
}
|
||||
if (y < kThumbOffset) {
|
||||
y = kThumbOffset;
|
||||
}
|
||||
|
||||
thumb.style.left = `${x}px`;
|
||||
thumb.style.top = `${y}px`;
|
||||
|
||||
const canvas = document.getElementById('zen-theme-builder-color-picker-canvas');
|
||||
const ctx = canvas.getContext('2d');
|
||||
const imageData = ctx.getImageData(x, y, 1, 1);
|
||||
|
||||
// Update the accent color.
|
||||
Services.prefs.setStringPref(kZenAccentColorConfigKey, this._rgbToHex(...imageData.data));
|
||||
},
|
||||
};
|
||||
@@ -21,6 +21,18 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
'BMB_mobileBookmarks',
|
||||
];
|
||||
|
||||
promiseDBInitialized = new Promise((resolve) => {
|
||||
this._resolveDBInitialized = resolve;
|
||||
});
|
||||
|
||||
promisePinnedInitialized = new Promise((resolve) => {
|
||||
this._resolvePinnedInitialized = resolve;
|
||||
});
|
||||
|
||||
async waitForPromises() {
|
||||
await Promise.all([this.promiseDBInitialized, this.promisePinnedInitialized, SessionStore.promiseAllWindowsRestored]);
|
||||
}
|
||||
|
||||
async init() {
|
||||
if (!this.shouldHaveWorkspaces) {
|
||||
document.getElementById('zen-current-workspace-indicator').setAttribute('hidden', 'true');
|
||||
@@ -66,6 +78,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
if (!this.workspaceEnabled) {
|
||||
return;
|
||||
}
|
||||
await this.waitForPromises();
|
||||
await this.initializeWorkspaces();
|
||||
console.info('ZenWorkspaces: ZenWorkspaces initialized');
|
||||
|
||||
@@ -376,7 +389,6 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
this._initializeWorkspaceTabContextMenus();
|
||||
await this.workspaceBookmarks();
|
||||
window.addEventListener('TabBrowserInserted', this.onTabBrowserInserted.bind(this));
|
||||
await SessionStore.promiseInitialized;
|
||||
let workspaces = await this._workspaces();
|
||||
let activeWorkspace = null;
|
||||
if (workspaces.workspaces.length === 0) {
|
||||
@@ -391,11 +403,11 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
activeWorkspace = workspaces.workspaces[0];
|
||||
this.activeWorkspace = activeWorkspace?.uuid;
|
||||
}
|
||||
await this.changeWorkspace(activeWorkspace, { onInit: true });
|
||||
}
|
||||
try {
|
||||
if (activeWorkspace) {
|
||||
window.gZenThemePicker = new ZenThemePicker();
|
||||
await this.changeWorkspace(activeWorkspace, { onInit: true });
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('ZenWorkspaces: Error initializing theme picker', e);
|
||||
@@ -1042,13 +1054,6 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
}
|
||||
let button = browser.document.getElementById('zen-workspaces-button');
|
||||
|
||||
if (!button) {
|
||||
button = browser.document.createXULElement('toolbarbutton');
|
||||
button.id = 'zen-workspaces-button';
|
||||
let navbar = browser.document.getElementById('nav-bar');
|
||||
navbar.appendChild(button);
|
||||
}
|
||||
|
||||
while (button.firstChild) {
|
||||
button.firstChild.remove();
|
||||
}
|
||||
@@ -1285,6 +1290,10 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
async _performWorkspaceChange(window, { onInit = false, explicitAnimationDirection = undefined } = {}) {
|
||||
const previousWorkspace = await this.getActiveWorkspace();
|
||||
|
||||
if (previousWorkspace && previousWorkspace.uuid === window.uuid && !onInit) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.activeWorkspace = window.uuid;
|
||||
const containerId = window.containerTabId?.toString();
|
||||
const workspaces = await this._workspaces();
|
||||
@@ -1321,40 +1330,37 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
}
|
||||
}
|
||||
|
||||
_animateElement(element, direction, out = false, callback) {
|
||||
if (out) {
|
||||
element.animate([{ transform: 'translateX(0)' }, { transform: `translateX(${direction === 'left' ? '-' : ''}100%)` }], {
|
||||
duration: 100,
|
||||
easing: 'ease',
|
||||
fill: 'both',
|
||||
}).onfinish = callback;
|
||||
return;
|
||||
}
|
||||
element.animate([{ transform: `translateX(${direction === 'left' ? '-' : ''}100%)` }, { transform: 'translateX(0)' }], {
|
||||
duration: 100,
|
||||
easing: 'ease',
|
||||
fill: 'both',
|
||||
}).onfinish = callback;
|
||||
}
|
||||
|
||||
async _animateTabs(direction, out = false) {
|
||||
const tabs = gBrowser.visibleTabs.filter((tab) => !tab.hasAttribute('zen-essential'));
|
||||
return new Promise((resolve) => {
|
||||
let count = 0;
|
||||
const onAnimationEnd = () => {
|
||||
count++;
|
||||
// +1 for the workspace indicator tab
|
||||
if (count >= tabs.length + 1) {
|
||||
resolve();
|
||||
const selector = `#tabbrowser-tabs *:is(.tabbrowser-tab:not([zen-essential], [hidden]), #tabbrowser-arrowscrollbox-periphery, #zen-current-workspace-indicator)`;
|
||||
this.tabContainer.removeAttribute('dont-animate-tabs');
|
||||
if (out) {
|
||||
return gZenUIManager.motion.animate(
|
||||
selector,
|
||||
{
|
||||
transform: `translateX(${direction === 'left' ? '-' : ''}100%)`,
|
||||
opacity: 0,
|
||||
},
|
||||
{
|
||||
type: 'spring',
|
||||
duration: 0.2,
|
||||
bounce: 0.2,
|
||||
// delay: gZenUIManager.motion.stagger(0.01),
|
||||
}
|
||||
};
|
||||
this.tabContainer.removeAttribute('dont-animate-tabs');
|
||||
// Also animate the workspace indicator label
|
||||
this._animateElement(document.getElementById('zen-current-workspace-indicator'), direction, out, () => onAnimationEnd());
|
||||
for (const tab of tabs) {
|
||||
this._animateElement(tab, direction, out, () => onAnimationEnd());
|
||||
);
|
||||
}
|
||||
return gZenUIManager.motion.animate(
|
||||
selector,
|
||||
{
|
||||
transform: [`translateX(${direction === 'left' ? '-' : ''}100%)`, 'translateX(0%)'],
|
||||
opacity: 1,
|
||||
},
|
||||
{
|
||||
duration: 0.2,
|
||||
type: 'spring',
|
||||
bounce: 0.2,
|
||||
// delay: gZenUIManager.motion.stagger(0.01),
|
||||
}
|
||||
});
|
||||
);
|
||||
}
|
||||
|
||||
_processTabVisibility(workspaceUuid, containerId, workspaces) {
|
||||
|
||||
@@ -70,6 +70,8 @@ var ZenWorkspacesStorage = {
|
||||
this.lazy.Weave.Service.engineManager.register(ZenWorkspacesEngine);
|
||||
await ZenWorkspacesStorage.migrateWorkspacesFromJSON();
|
||||
}
|
||||
|
||||
ZenWorkspaces._resolveDBInitialized();
|
||||
});
|
||||
},
|
||||
|
||||
@@ -603,4 +605,7 @@ var ZenWorkspaceBookmarksStorage = {
|
||||
},
|
||||
};
|
||||
|
||||
ZenWorkspacesStorage.init();
|
||||
ZenWorkspacesStorage.promiseDBInitialized = new Promise((resolve) => {
|
||||
ZenWorkspacesStorage._resolveDBInitialized = resolve;
|
||||
ZenWorkspacesStorage.init();
|
||||
});
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/customizableui/CustomizableUI.sys.mjs b/browser/components/customizableui/CustomizableUI.sys.mjs
|
||||
index b953d7d2c8fa7fe2d320bd7cb7af9aeeef0abc86..b161c73fe690c172a9be266894f72427b1d934e3 100644
|
||||
index b953d7d2c8fa7fe2d320bd7cb7af9aeeef0abc86..1a3142c58af638a731f546b8695a0fc3fab9054c 100644
|
||||
--- a/browser/components/customizableui/CustomizableUI.sys.mjs
|
||||
+++ b/browser/components/customizableui/CustomizableUI.sys.mjs
|
||||
@@ -13,6 +13,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
||||
@@ -72,7 +72,33 @@ index b953d7d2c8fa7fe2d320bd7cb7af9aeeef0abc86..b161c73fe690c172a9be266894f72427
|
||||
// For toolbars that need it, mark as dirty.
|
||||
let defaultPlacements = areaProperties.get("defaultPlacements");
|
||||
if (
|
||||
@@ -3609,7 +3608,7 @@ var CustomizableUIInternal = {
|
||||
@@ -1540,7 +1539,7 @@ var CustomizableUIInternal = {
|
||||
lazy.log.info(
|
||||
"Widget " + aWidgetId + " not found, unable to remove from " + aArea
|
||||
);
|
||||
- continue;
|
||||
+ // continue;
|
||||
}
|
||||
|
||||
this.notifyDOMChange(widgetNode, null, container, true, () => {
|
||||
@@ -1550,7 +1549,7 @@ var CustomizableUIInternal = {
|
||||
// We also need to remove the panel context menu if it's there:
|
||||
this.ensureButtonContextMenu(widgetNode);
|
||||
if (gPalette.has(aWidgetId) || this.isSpecialWidget(aWidgetId)) {
|
||||
- container.removeChild(widgetNode);
|
||||
+ widgetNode.remove();
|
||||
} else {
|
||||
window.gNavToolbox.palette.appendChild(widgetNode);
|
||||
}
|
||||
@@ -2654,7 +2653,6 @@ var CustomizableUIInternal = {
|
||||
if (!this.isWidgetRemovable(aWidgetId)) {
|
||||
return;
|
||||
}
|
||||
-
|
||||
let placements = gPlacements.get(oldPlacement.area);
|
||||
let position = placements.indexOf(aWidgetId);
|
||||
if (position != -1) {
|
||||
@@ -3609,7 +3607,7 @@ var CustomizableUIInternal = {
|
||||
}
|
||||
},
|
||||
|
||||
@@ -81,7 +107,7 @@ index b953d7d2c8fa7fe2d320bd7cb7af9aeeef0abc86..b161c73fe690c172a9be266894f72427
|
||||
for (let [areaId, areaNodes] of gBuildAreas) {
|
||||
let placements = gPlacements.get(areaId);
|
||||
let isFirstChangedToolbar = true;
|
||||
@@ -3620,7 +3619,7 @@ var CustomizableUIInternal = {
|
||||
@@ -3620,7 +3618,7 @@ var CustomizableUIInternal = {
|
||||
if (area.get("type") == CustomizableUI.TYPE_TOOLBAR) {
|
||||
let defaultCollapsed = area.get("defaultCollapsed");
|
||||
let win = areaNode.ownerGlobal;
|
||||
@@ -90,7 +116,7 @@ index b953d7d2c8fa7fe2d320bd7cb7af9aeeef0abc86..b161c73fe690c172a9be266894f72427
|
||||
win.setToolbarVisibility(
|
||||
areaNode,
|
||||
typeof defaultCollapsed == "string"
|
||||
@@ -4583,6 +4582,7 @@ export var CustomizableUI = {
|
||||
@@ -4583,6 +4581,7 @@ export var CustomizableUI = {
|
||||
unregisterArea(aName, aDestroyPlacements) {
|
||||
CustomizableUIInternal.unregisterArea(aName, aDestroyPlacements);
|
||||
},
|
||||
@@ -98,3 +124,22 @@ index b953d7d2c8fa7fe2d320bd7cb7af9aeeef0abc86..b161c73fe690c172a9be266894f72427
|
||||
/**
|
||||
* Add a widget to an area.
|
||||
* If the area to which you try to add is not known to CustomizableUI,
|
||||
@@ -6404,7 +6403,8 @@ class OverflowableToolbar {
|
||||
this.#target
|
||||
);
|
||||
totalAvailWidth =
|
||||
- getInlineSize(this.#toolbar) -
|
||||
+ ((win.gZenVerticalTabsManager._hasSetSingleToolbar ? parseInt(this.#toolbar.closest("#navigator-toolbox")?.getAttribute("width")) : 0) ||
|
||||
+ getInlineSize(this.#toolbar)) -
|
||||
parseFloat(style.paddingLeft) -
|
||||
parseFloat(style.paddingRight) -
|
||||
toolbarChildrenWidth;
|
||||
@@ -6516,7 +6516,7 @@ class OverflowableToolbar {
|
||||
}
|
||||
}
|
||||
if (!inserted) {
|
||||
- this.#target.appendChild(child);
|
||||
+ win.gZenVerticalTabsManager.appendCustomizableItem(this.#target, child, gPlacements.get(this.#toolbar.id));
|
||||
}
|
||||
child.removeAttribute("cui-anchorid");
|
||||
child.removeAttribute("overflowedItem");
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/places/content/browserPlacesViews.js b/browser/components/places/content/browserPlacesViews.js
|
||||
index 1bfa0af16178c9b42172bc1b1e0249d28ff8e9e6..cefe17335cb7cc1a22182f2e79c564237b9ae5e8 100644
|
||||
index 1bfa0af16178c9b42172bc1b1e0249d28ff8e9e6..6744a37b7183ab9e3ac5bced7ded715879063eb5 100644
|
||||
--- a/browser/components/places/content/browserPlacesViews.js
|
||||
+++ b/browser/components/places/content/browserPlacesViews.js
|
||||
@@ -330,12 +330,23 @@ class PlacesViewBase {
|
||||
@@ -33,7 +33,7 @@ index 1bfa0af16178c9b42172bc1b1e0249d28ff8e9e6..cefe17335cb7cc1a22182f2e79c56423
|
||||
"scheme",
|
||||
PlacesUIUtils.guessUrlSchemeForUI(aPlacesNode.uri)
|
||||
);
|
||||
+ element.addEventListener("command", gZenGlanceManager.openGlanceForBookmark.bind(gZenGlanceManager));
|
||||
+ element.addEventListener("command", (e) => window.gZenGlanceManager.openGlanceForBookmark(e));
|
||||
} else if (PlacesUtils.containerTypes.includes(type)) {
|
||||
element = document.createXULElement("menu");
|
||||
element.setAttribute("container", "true");
|
||||
|
||||
@@ -494,7 +494,6 @@ var gZenLooksAndFeel = {
|
||||
this.__hasInitialized = true;
|
||||
this._initializeColorPicker(this._getInitialAccentColor());
|
||||
window.zenPageAccentColorChanged = this._handleAccentColorChange.bind(this);
|
||||
gZenThemeBuilder.init();
|
||||
gZenMarketplaceManager.init();
|
||||
var onPreferColorSchemeChange = this.onPreferColorSchemeChange.bind(this);
|
||||
window.matchMedia('(prefers-color-scheme: dark)').addListener(onPreferColorSchemeChange);
|
||||
@@ -978,11 +977,6 @@ Preferences.addAll([
|
||||
type: 'bool',
|
||||
default: true,
|
||||
},
|
||||
{
|
||||
id: 'zen.view.compact',
|
||||
type: 'bool',
|
||||
default: false,
|
||||
},
|
||||
{
|
||||
id: 'zen.view.compact.hide-toolbar',
|
||||
type: 'bool',
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
<script src="chrome://browser/content/zen-components/ZenThemeBuilder.mjs" defer=""/>
|
||||
<script src="chrome://browser/content/preferences/zen-settings.js"/>
|
||||
<html:template id="template-paneZenLooks">
|
||||
|
||||
@@ -236,9 +235,6 @@
|
||||
<label><html:h2 data-l10n-id="zen-look-and-feel-compact-view-header"/></label>
|
||||
<description class="description-deemphasized" data-l10n-id="zen-look-and-feel-compact-view-description" />
|
||||
|
||||
<checkbox id="zenLooksAndFeelShowCompactView"
|
||||
data-l10n-id="zen-look-and-feel-compact-view-enabled"
|
||||
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">
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/browser/themes/shared/identity-block/identity-block.css b/browser/themes/shared/identity-block/identity-block.css
|
||||
index cb6bb55dd3aebdaebb92c9e2cba1f2a108b4d7bb..9d5055a007c63cb779e67ae58a1d937ad2a31bfe 100644
|
||||
index 11ff8f62c9e40fd2f523387a4325518f383f5d11..d6563e2ddf963caa34bee716c42f9d440c327b61 100644
|
||||
--- a/browser/themes/shared/identity-block/identity-block.css
|
||||
+++ b/browser/themes/shared/identity-block/identity-block.css
|
||||
@@ -70,7 +70,7 @@
|
||||
@@ -80,7 +80,7 @@
|
||||
|
||||
#identity-box[pageproxystate="valid"]:is(.notSecureText, .chromeUI, .extensionPage) > .identity-box-button,
|
||||
#urlbar-label-box {
|
||||
@@ -11,12 +11,13 @@ index cb6bb55dd3aebdaebb92c9e2cba1f2a108b4d7bb..9d5055a007c63cb779e67ae58a1d937a
|
||||
color: var(--urlbar-box-text-color);
|
||||
padding-inline: 8px;
|
||||
border-radius: var(--urlbar-icon-border-radius);
|
||||
@@ -164,16 +164,16 @@
|
||||
@@ -174,16 +174,17 @@
|
||||
}
|
||||
|
||||
#identity-icon {
|
||||
- list-style-image: url(chrome://global/skin/icons/search-glass.svg);
|
||||
+ list-style-image: url(chrome://global/skin/icons/search-glass.svg) !important;
|
||||
+ fill-opacity: 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,16 @@
|
||||
diff --git a/browser/themes/shared/toolbarbuttons.css b/browser/themes/shared/toolbarbuttons.css
|
||||
index ca1d70b515f17922c3625e38e2110368ad0de652..22cb71fb3d254edf46a73c4308a0e136002f203a 100644
|
||||
index ca1d70b515f17922c3625e38e2110368ad0de652..3ac05678b10f054d16093a225eb93bb8ed26a116 100644
|
||||
--- a/browser/themes/shared/toolbarbuttons.css
|
||||
+++ b/browser/themes/shared/toolbarbuttons.css
|
||||
@@ -210,7 +210,7 @@ toolbar[brighttext] .toolbaritem-combined-buttons > separator {
|
||||
#nav-bar-overflow-button {
|
||||
list-style-image: url("chrome://global/skin/icons/chevron.svg");
|
||||
|
||||
- #nav-bar:not([overflowing], [nonemptyoverflow], [customizing]) > & {
|
||||
+ toolbar:not([overflowing], [nonemptyoverflow], [customizing]) > & {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@@ -420,7 +420,7 @@ toolbarbutton.bookmark-item:not(.subviewbutton) {
|
||||
*/
|
||||
align-items: stretch;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/toolkit/moz.configure b/toolkit/moz.configure
|
||||
index 9c3bb513537f1efc44788fc3efb9f7561eca9c0e..b1dd5bd9c28c95c69486b9803c76279af01459bd 100644
|
||||
index 9c3bb513537f1efc44788fc3efb9f7561eca9c0e..dcada8742c5ea147d2378357c86c9a8b7dc639db 100644
|
||||
--- a/toolkit/moz.configure
|
||||
+++ b/toolkit/moz.configure
|
||||
@@ -81,10 +81,13 @@ option(
|
||||
@@ -39,14 +39,3 @@ index 9c3bb513537f1efc44788fc3efb9f7561eca9c0e..b1dd5bd9c28c95c69486b9803c76279a
|
||||
|
||||
|
||||
option(
|
||||
@@ -3535,8 +3538,8 @@ with only_when(compile_environment):
|
||||
@depends(target)
|
||||
def default_user_appdir(target):
|
||||
if target.kernel in ("WINNT", "Darwin"):
|
||||
- return "Mozilla"
|
||||
- return ".mozilla"
|
||||
+ return "Zen"
|
||||
+ return ".zen"
|
||||
|
||||
option(
|
||||
"--with-user-appdir",
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
"brandShortName": "Zen",
|
||||
"brandFullName": "Zen Browser",
|
||||
"release": {
|
||||
"displayVersion": "1.7b",
|
||||
"displayVersion": "1.7.1b",
|
||||
"github": {
|
||||
"repo": "zen-browser/desktop"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user