theme/fluent/slider.go

Functions Structs

Functions

func PaintSlider

PaintSlider renders a slider according to Fluent Design specifications.

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 {
		flPaintVerticalSlider(canvas, ps, disabled, colors)
	} else {
		flPaintHorizontalSlider(canvas, ps, disabled, colors)
	}
}

Structs

type SliderPainter struct

SliderPainter renders sliders using Fluent Design tokens.

 

If Theme is nil, SliderPainter falls back to the default Fluent Blue palette.

type SliderPainter struct {
	Theme *Theme	// nil uses default Fluent Blue fallback
}