feat: add scrollbar for virtualized lists

This commit is contained in:
2026-11-04 13:05:39 +07:00
parent 4bfc816cbe
commit 50da1d4a9d
10 changed files with 1033 additions and 23 deletions
+5 -1
View File
@@ -225,7 +225,8 @@ impl Default for Motion {
}
}
/// Overlay scrollbar geometry, transcribed from the platform's overlay crollbars.
/// Overlay scrollbar presentation, transcribed from the platform's overlay
/// crollbars.
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct Scrollbar {
/// The painted thumb's thickness.
@@ -234,6 +235,8 @@ pub struct Scrollbar {
pub inset: Pixels,
/// The thumb never shrinks below this length, so it stays grabbable.
pub min_thumb: Pixels,
/// Whether the platform's scrollbars hide while idle.
pub autohide: bool,
}
impl Default for Scrollbar {
@@ -242,6 +245,7 @@ impl Default for Scrollbar {
width: px(8.),
inset: px(2.),
min_thumb: px(24.),
autohide: false,
}
}
}