mirror of
https://github.com/zen-browser/desktop.git
synced 2025-07-07 21:49:58 +02:00
fix: Fixed split view having clipped dialogs, b=no-bug, c=compact-mode, split-view, workspaces
This commit is contained in:
parent
12ae2daeba
commit
08947fd4a1
3 changed files with 11 additions and 8 deletions
|
@ -209,7 +209,7 @@ var gZenCompactModeManager = {
|
||||||
// the caller is from the ResizeObserver
|
// the caller is from the ResizeObserver
|
||||||
getAndApplySidebarWidth(event = undefined) {
|
getAndApplySidebarWidth(event = undefined) {
|
||||||
if (this._ignoreNextResize) {
|
if (this._ignoreNextResize) {
|
||||||
this._ignoreNextResize = false;
|
delete this._ignoreNextResize;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let sidebarWidth = this.sidebar.getBoundingClientRect().width;
|
let sidebarWidth = this.sidebar.getBoundingClientRect().width;
|
||||||
|
@ -245,9 +245,9 @@ var gZenCompactModeManager = {
|
||||||
},
|
},
|
||||||
|
|
||||||
animateCompactMode() {
|
animateCompactMode() {
|
||||||
|
// Get the splitter width before hiding it (we need to hide it before animating on right)
|
||||||
|
document.documentElement.setAttribute('zen-compact-animating', 'true');
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
// Get the splitter width before hiding it (we need to hide it before animating on right)
|
|
||||||
document.documentElement.setAttribute('zen-compact-animating', 'true');
|
|
||||||
// We need to set the splitter width before hiding it
|
// We need to set the splitter width before hiding it
|
||||||
let splitterWidth = document
|
let splitterWidth = document
|
||||||
.getElementById('zen-sidebar-splitter')
|
.getElementById('zen-sidebar-splitter')
|
||||||
|
@ -268,6 +268,7 @@ var gZenCompactModeManager = {
|
||||||
this.sidebar.style.removeProperty('margin-left');
|
this.sidebar.style.removeProperty('margin-left');
|
||||||
this.sidebar.style.removeProperty('transform');
|
this.sidebar.style.removeProperty('transform');
|
||||||
window.requestAnimationFrame(() => {
|
window.requestAnimationFrame(() => {
|
||||||
|
delete this._ignoreNextResize;
|
||||||
let sidebarWidth = this.getAndApplySidebarWidth();
|
let sidebarWidth = this.getAndApplySidebarWidth();
|
||||||
const elementSeparation = ZenThemeModifier.elementSeparation;
|
const elementSeparation = ZenThemeModifier.elementSeparation;
|
||||||
if (!canAnimate) {
|
if (!canAnimate) {
|
||||||
|
@ -324,6 +325,8 @@ var gZenCompactModeManager = {
|
||||||
} else {
|
} else {
|
||||||
sidebarWidth -= elementSeparation;
|
sidebarWidth -= elementSeparation;
|
||||||
}
|
}
|
||||||
|
this.sidebar.style.marginRight = '0px';
|
||||||
|
this.sidebar.style.marginLeft = '0px';
|
||||||
gZenUIManager.motion
|
gZenUIManager.motion
|
||||||
.animate(
|
.animate(
|
||||||
this.sidebar,
|
this.sidebar,
|
||||||
|
@ -335,7 +338,7 @@ var gZenCompactModeManager = {
|
||||||
ease: 'easeIn',
|
ease: 'easeIn',
|
||||||
type: 'spring',
|
type: 'spring',
|
||||||
bounce: 0,
|
bounce: 0,
|
||||||
duration: 0.2,
|
duration: 0.1,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
@ -386,7 +389,7 @@ var gZenCompactModeManager = {
|
||||||
ease: 'easeOut',
|
ease: 'easeOut',
|
||||||
type: 'spring',
|
type: 'spring',
|
||||||
bounce: 0,
|
bounce: 0,
|
||||||
duration: 0.2,
|
duration: 0.1,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
|
|
@ -35,9 +35,9 @@
|
||||||
position: absolute !important;
|
position: absolute !important;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
&.deck-selected:has(.dialogStack:not([hidden='true'])) {
|
& .dialogStack {
|
||||||
/* Fix for issue https://github.com/zen-browser/desktop/issues/7564 */
|
/* Fix for issue https://github.com/zen-browser/desktop/issues/7564 */
|
||||||
z-index: 1;
|
position: absolute;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1129,7 +1129,7 @@
|
||||||
`linear-gradient(to top, ${color3} -30%, transparent 60%)`,
|
`linear-gradient(to top, ${color3} -30%, transparent 60%)`,
|
||||||
].join(', ');
|
].join(', ');
|
||||||
}
|
}
|
||||||
return [`linear-gradient(${rotation}deg, ${color1} -30%, ${color3} 100%)`].join(', ');
|
return [`linear-gradient(120deg, ${color1} -30%, ${color3} 100%)`].join(', ');
|
||||||
} else {
|
} else {
|
||||||
// Just return a linear gradient with all colors
|
// Just return a linear gradient with all colors
|
||||||
const gradientColors = themedColors.map((color) =>
|
const gradientColors = themedColors.map((color) =>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue