Smooth wheel scrolling: route scroll over sliders to the list or the volume (#5)
CI / check (push) Successful in 9s
CI / native (push) Successful in 1m14s

This commit was merged in pull request #5.
This commit is contained in:
nandi committed 2026-11-23 06:55:50 +00:00
1 parent 0760d7ba6c
commit d360b51bb2
9 files changed
+511 -15

No files matched your search

+26
View File
@@ -12,6 +12,8 @@ pub const FILE_ICON_PREFIX : String = "file:"
pub const ICON_MISSING : String = "image-missing"
pub const LIST_LATCH_US : Int64 = 600_000
pub const MAX_PERCENT : Double = 150.0
pub const METER_DECAY : Double = 0.04
@@ -22,6 +24,8 @@ pub const MIN_UI_CONTRAST : Double = 3.0
pub const NORM_PERCENT : Double = 100.0
pub const WHEEL_STEP_PERCENT : Double = 2.0
pub fn accent_css(Rgb, Bool) -> String
pub fn accent_text_color(Rgb, Bool) -> Rgb
@@ -88,6 +92,8 @@ pub fn volume_icon(Double, Bool) -> String
pub fn volume_icon_chain(Double, Bool) -> Array[String]
pub fn wheel_delta_percent(ScrollUnit, Double, Double, Double) -> Double
pub let white : Rgb
pub fn window_bg(Bool) -> Rgb
@@ -199,6 +205,20 @@ pub(all) struct Row {
current_choice : Int32
}
#derive(Eq, @debug.Debug)
pub(all) enum ScrollUnit {
Wheel
Pixels
}
pub struct SliderWheel {
// private fields
}
pub fn SliderWheel::new() -> Self
pub fn SliderWheel::reset(Self) -> Unit
pub fn SliderWheel::route(Self, ScrollUnit, Double, Double, Int64) -> WheelRoute
pub fn SliderWheel::scroll(Self, ScrollUnit, Double, Double, Int64, Double, Double) -> Double?
pub(all) struct State {
nodes : Map[Int32, Node]
mut links : Array[Link]
@@ -224,6 +244,12 @@ pub fn Tab::icon_chain(Self) -> Array[String]
pub fn Tab::label(Self) -> String
pub fn Tab::node_kind(Self) -> NodeKind
#derive(Eq, @debug.Debug)
pub(all) enum WheelRoute {
Slider
List
}
// Type aliases
// Traits