Give the film list a scrollbar on the desktop

A list cut off at its edge looks, to a mouse, like a list that ends
there. The open film list shows ten rows of twenty-eight, and nothing
said there were more. The user asked for visible scrollbars on every
platform but Android.

ScrollBar (widgets.slint) is a vertical bar drawn over a Flickable's
right-hand edge. It shows the share on screen and the position, it can
be dragged by the thumb from wherever it was grabbed, a click on the
track moves a page toward the click, and the wheel over it scrolls. It
is the Flickable's sibling rather than a wrapper, bound to
`viewport-y <=> flick.viewport-y` and the two heights, so a scroller
keeps its own sizing. It is drawn over the content rather than beside
it, so the mandated column widths are not reduced. With nothing to
scroll it is not drawn and takes no input.

Whether to draw it is Scrolling.bars, which Rust sets from
dr_plat::is_touch_first(). That is the same function that puts the
develop groups in the rail, and it answers the same question: what is
the user pointing with? On Android, lists still scroll by flick only.
Placing the bar inside another scroller would put it back in that
scroller's arbitration. The film list can have one because it is now a
popup.
This commit is contained in:
2026-09-26 07:24:45 -04:00
parent 80938b0527
commit e957d483fc
7 changed files with 229 additions and 67 deletions
+8
View File
@@ -288,6 +288,14 @@ pub const GESTURES: &[Gesture] = &[
keys: "Enter, on the export and copy sheets",
manual: "",
},
Gesture {
title: "Scroll by the scrollbar",
section: "Everywhere",
touch: "",
pointer: "Drag the bar along the right-hand edge of a list, or click the track above or below it to move by a page",
keys: "",
manual: "",
},
Gesture {
title: "Pick a collection up to rearrange the tree",
section: "Collections sidebar",
+9
View File
@@ -229,6 +229,15 @@ pub fn wire<F>(
.global::<Library>()
.set_library_touched(cfg!(target_os = "android"));
// TRACES: FR-UI-1
// Scrollbars for a pointer, none for a finger: the same question, asked
// of the same function, that puts the develop groups in the rail. Set
// here, once, because every scroller that draws a bar reads it and none
// of them can change it.
window
.global::<crate::Scrolling>()
.set_bars(!dr_plat::is_touch_first());
// TRACES: FR-UI-4
// The gesture reference. Pushed once, here, rather than on demand: the
// table is a compiled-in constant, so there is nothing to be fresh about