theme/cupertino/slider.go
Functions
func PaintSlider
func (p SliderPainter) PaintSlider(canvas widget.Canvas, ps slider.PaintState) {
if ps.Bounds.IsEmpty() {
return
}
colors := ps.ColorScheme
if colors == (slider.SliderColorScheme{}) {
colors = p.resolveColors()
}
disabled := ps.Disabled
if ps.Orientation == slider.Vertical {
cupPaintVerticalSlider(canvas, ps, disabled, colors)
} else {
cupPaintHorizontalSlider(canvas, ps, disabled, colors)
}
}
Structs
type SliderPainter struct
SliderPainter renders sliders using Apple HIG design tokens.
Cupertino sliders use a thin track with accent-colored active fill
and a white thumb with a subtle shadow, following iOS slider conventions.
If Theme is nil, SliderPainter falls back to the default system blue palette.
type SliderPainter struct {
Theme *Theme // nil uses default system blue fallback
}
PaintSlider renders a slider according to Apple HIG specifications.