mirror of
https://github.com/zen-browser/desktop.git
synced 2025-10-05 17:36:34 +00:00
Add Linux-specific padding for toolbox and clean up drag indicator calculations
This commit is contained in:
@@ -76,6 +76,9 @@
|
|||||||
@media (-moz-platform: macos) {
|
@media (-moz-platform: macos) {
|
||||||
--zen-min-toolbox-padding: .52rem;
|
--zen-min-toolbox-padding: .52rem;
|
||||||
}
|
}
|
||||||
|
@media (-moz-platform: linux) {
|
||||||
|
--zen-min-toolbox-padding: .35rem;
|
||||||
|
}
|
||||||
--zen-toolbox-padding: max(var(--zen-min-toolbox-padding), calc(var(--zen-element-separation) / 1.5));
|
--zen-toolbox-padding: max(var(--zen-min-toolbox-padding), calc(var(--zen-element-separation) / 1.5));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -767,13 +767,13 @@
|
|||||||
const separation = 8;
|
const separation = 8;
|
||||||
const middleY = targetTab.screenY + rect.height / 2;
|
const middleY = targetTab.screenY + rect.height / 2;
|
||||||
const indicator = this.dragIndicator;
|
const indicator = this.dragIndicator;
|
||||||
let top=0;
|
let top = 0;
|
||||||
if (event.screenY > middleY) {
|
if (event.screenY > middleY) {
|
||||||
top = rect.top + rect.height + 'px';
|
top = rect.top + rect.height + 'px';
|
||||||
} else {
|
} else {
|
||||||
top = rect.top + 'px';
|
top = rect.top + 'px';
|
||||||
}
|
}
|
||||||
indicator.style.setProperty('--indicator-left', rect.left + (separation/2) + 'px');
|
indicator.style.setProperty('--indicator-left', rect.left + separation / 2 + 'px');
|
||||||
indicator.style.setProperty('--indicator-width', rect.width - separation + 'px');
|
indicator.style.setProperty('--indicator-width', rect.width - separation + 'px');
|
||||||
indicator.style.top = top;
|
indicator.style.top = top;
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user