fix(layout): title row background in settings

This commit is contained in:
Elian Doran 2025-12-09 16:39:31 +02:00
parent a2cff42981
commit 5d59c953c2
No known key found for this signature in database
3 changed files with 9 additions and 3 deletions

View File

@ -2564,5 +2564,4 @@ body.desktop .title-row {
height: 50px;
min-height: 50px;
align-items: center;
background: var(--note-split-background-color, var(--main-background-color));
}

View File

@ -1,11 +1,16 @@
.content-header-widget {
position: relative;
z-index: 8;
background-color: var(--main-background-color);
}
.note-split.bgfx .content-header-widget {
background-color: transparent;
}
.content-header-widget.floating {
position: sticky;
top: 0;
z-index: 11;
background-color: var(--main-background-color, #fff);
background-color: var(--main-background-color, #fff) !important;
}

View File

@ -47,7 +47,9 @@ export default class ContentHeader extends Container<BasicWidget> {
const isScrollingUp = currentScrollTop < this.previousScrollTop;
const hasMovedEnough = Math.abs(currentScrollTop - this.previousScrollTop) > this.scrollThreshold;
if (hasMovedEnough) {
if (currentScrollTop === 0) {
this.setFloating(false);
} else if (hasMovedEnough) {
this.setFloating(isScrollingUp);
}
this.previousScrollTop = currentScrollTop;