revert(qbz-slint): remove hover-reveal scrollbar feature
Restore ListScrollbar, TrackRow and AlbumPageView to their pre-scrollbar state (always-visible scrollbars). The per-row hover-reveal only revealed the bar over track rows, not over the whole scrollable viewport, so on mixed-content views (Artist, Label) it felt incomplete. Card sizing (Album/Playlist/Radio at 200px) is kept. cc
This commit is contained in:
3 files changed
+1
-29
No files matched your search
@@ -11,18 +11,9 @@ export component ListScrollbar inherits Rectangle {
|
||||
in property <length> viewport-height;
|
||||
in property <length> visible-height;
|
||||
in-out property <length> viewport-y;
|
||||
// Hover-reveal: the owning view sets this true while the pointer is over the
|
||||
// scrollable rows; the bar also reveals on its own gutter hover/drag. When
|
||||
// false it fades out. DEFAULTS TRUE so views that don't wire it keep the bar
|
||||
// always visible (no behaviour change until a view opts in).
|
||||
in property <bool> reveal: true;
|
||||
|
||||
// Only meaningful when the content overflows.
|
||||
property <length> max-scroll: max(0px, root.viewport-height - root.visible-height);
|
||||
|
||||
// Fade out unless revealed (by row hover) or the gutter itself is engaged.
|
||||
opacity: (root.reveal || bar-ta.has-hover || bar-ta.pressed) ? 1.0 : 0.0;
|
||||
animate opacity { duration: 150ms; }
|
||||
property <length> thumb-h:
|
||||
root.viewport-height > 0px
|
||||
? max(48px, root.visible-height / root.viewport-height * root.height)
|
||||
|
||||
@@ -47,20 +47,12 @@ export component TrackRow inherits Rectangle {
|
||||
// Whether the row can be dragged onto sidebar playlists.
|
||||
in property <bool> draggable: true;
|
||||
callback media-action(string, string, string);
|
||||
// Reports the row's overall hover state so a list view can reveal its
|
||||
// scrollbar while the pointer is anywhere over the rows (the proven sidebar
|
||||
// pattern — a background/Flickable-level TouchArea can't see hover over a
|
||||
// row's own touch areas).
|
||||
callback hover-changed(bool);
|
||||
|
||||
// Explicit track number, else the 1-based list position.
|
||||
property <string> number-text:
|
||||
root.track.number != "" ? root.track.number : "\{root.index + 1}";
|
||||
property <bool> row-hovered:
|
||||
ta.has-hover || play-cell.hovered || more-ta.has-hover;
|
||||
changed row-hovered => {
|
||||
root.hover-changed(self.row-hovered);
|
||||
}
|
||||
|
||||
height: 50px;
|
||||
border-radius: 8px;
|
||||
|
||||
Reference in new issue
Block a user