forked from ZenBrowserMirrors/zen-desktop
Fix for #7910
This fixes #7910 by adding a conditional check for whether the sidebar is on the right and adjusting the CSS accordingly. Signed-off-by: Samuel Oldham <77629938+SO9010@users.noreply.github.com>
This commit is contained in:
parent
fdb71c6b0e
commit
c8150ccdcc
2 changed files with 16 additions and 1 deletions
|
@ -50,6 +50,10 @@
|
|||
});
|
||||
}
|
||||
|
||||
#areTabsOnRightSide() {
|
||||
return Services.prefs.getBoolPref('zen.tabs.vertical.right-side');
|
||||
}
|
||||
|
||||
get #currentBrowser() {
|
||||
return this.#glances.get(this.#currentGlanceID)?.browser;
|
||||
}
|
||||
|
@ -124,6 +128,11 @@
|
|||
|
||||
showSidebarButtons(animate = false) {
|
||||
if (this.sidebarButtons.hasAttribute('hidden') && animate) {
|
||||
if (this.#areTabsOnRightSide()) {
|
||||
this.sidebarButtons.setAttribute('right', true);
|
||||
} else {
|
||||
this.sidebarButtons.removeAttribute('right');
|
||||
}
|
||||
for (const button of this.sidebarButtons.querySelectorAll('toolbarbutton')) {
|
||||
button.style.opacity = 0;
|
||||
}
|
||||
|
|
|
@ -18,7 +18,13 @@
|
|||
|
||||
padding: 5px;
|
||||
gap: 12px;
|
||||
left: 2%;
|
||||
|
||||
&[right='true'] {
|
||||
right: 2%;
|
||||
}
|
||||
&[right='false'] {
|
||||
left: 2%;
|
||||
}
|
||||
|
||||
& toolbarbutton {
|
||||
width: 32px;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue