chore: Update Zen Browser styles for dark mode compatibility

This commit is contained in:
Mauro Balades
2024-07-19 23:11:15 +02:00
parent 8c1e1bc97d
commit b44d4b4f41
5 changed files with 29 additions and 11 deletions

View File

@@ -320,14 +320,6 @@ jobs:
- name: Import
run: pnpm surfer import --verbose
- name: Setup vs2022 and PGO
run: |
cd engine/
export GEN_PGO=1
./mach python --virtualenv build ./taskcluster/scripts/misc/get_vs.py build/vs/vs2022.yaml $HOME/win-cross
ls ~/win-cross/vs2022 || true
chmod -R +x "$(echo ~)/win-cross/vs2022" || true
- name: Build
run: |
unset SURFER_PLATFORM

View File

@@ -21,8 +21,8 @@ export MOZ_INCLUDE_SOURCE_INFO=1
export MOZ_STUB_INSTALLER=1
export WINEDEBUG=-all
export WINE="$TOOLS/wine/bin/wine64"
export WIN32_REDIST_DIR="$TOOLS"/VC/Redist/MSVC/14.34.31931/x64/Microsoft.VC143.CRT
export WIN_UCRT_REDIST_DIR="$TOOLS/Windows Kits/10/Redist/10.0.22621.0/ucrt/DLLs/x64"
export WIN32_REDIST_DIR="$TOOLS"/vs2022/VC/Redist/MSVC/14.34.31931/x64/Microsoft.VC143.CRT
export WIN_UCRT_REDIST_DIR="$TOOLS/vs2022/Windows Kits/10/Redist/10.0.22621.0/ucrt/DLLs/x64"
export RUSTFLAGS="$RUSTFLAGS -Ctarget-cpu=x86-64"

View File

@@ -59,5 +59,9 @@ var gZenVerticalTabsManager = {
toggleExpand() {
let expanded = !this.expanded;
Services.prefs.setBoolPref('zen.view.sidebar-expanded', expanded);
let toolbox = document.getElementById('navigator-toolbox');
toolbox.removeAttribute('width');
toolbox.style.removeProperty('width');
},
};

View File

@@ -90,6 +90,15 @@ var ZenThemeModifier = {
}
}
appWrapepr.setAttribute("hidden", "true");
// 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");
const titlebar = document.getElementById("navigator-toolbox");
titlebar.insertAdjacentElement("afterend", splitter);
},
_zenInitBrowserLayout() {

View File

@@ -617,13 +617,26 @@ panelmultiview {
}
/* Expanded sidebar */
#zen-sidebar-splitter {
display: none;
opacity: 0;
}
@media (-moz-bool-pref: "zen.view.sidebar-expanded") {
#navigator-toolbox {
min-width: 170px;
min-width: 150px;
align-items: start;
padding-left: 10px;
padding-right: 10px;
max-width: 210px;
transition: .2s;
width: 170px;
border: none;
}
#zen-sidebar-splitter {
display: block;
width: 1px;
}
.tab-label-container {