pub struct RectangularRangeSliderTrackShape;Expand description
A RangeSlider track that’s a simple rectangle.
It paints a solid colored rectangle, vertically centered in the
parent_box. The track rectangle extends to the bounds of the parent_box,
but is padded by the RoundSliderOverlayShape radius. The height is
defined by the SliderThemeData::track_height. The color is determined by the
Slider’s enabled state and the track segment’s active state which are
defined by:
SliderThemeData::active_track_color,
SliderThemeData::inactive_track_color,
SliderThemeData::disabled_active_track_color,
SliderThemeData::disabled_inactive_track_color.
The track segment between the two thumbs is the active track segment. The
track segments between the thumb and each end of the slider are the inactive
track segments. In TextDirection::Ltr, the start of the slider is on the
left, and in TextDirection::Rtl, the start of the slider is on the right.
See also:
RangeSlider, for the component that is meant to display this shape.SliderThemeData, where an instance of this class is set to inform the slider of the visual details of the its track.RangeSliderTrackShape, which can be used to create custom shapes for theRangeSlider’s track.RoundedRectRangeSliderTrackShape, for a similar track with rounded edges.
Implementations§
Source§impl RectangularRangeSliderTrackShape
impl RectangularRangeSliderTrackShape
Sourcepub const fn new() -> RectangularRangeSliderTrackShape
pub const fn new() -> RectangularRangeSliderTrackShape
Create a slider track with rectangular outer edges.
The middle track segment is the selected range and is active, and the two outer track segments are inactive.
Trait Implementations§
Source§impl BaseRangeSliderTrackShape for RectangularRangeSliderTrackShape
impl BaseRangeSliderTrackShape for RectangularRangeSliderTrackShape
Source§fn get_preferred_rect(
&self,
app: &App,
parent_box: AnyRenderBox,
offset: Offset,
slider_theme: &SliderThemeData,
is_enabled: Option<bool>,
is_discrete: Option<bool>,
) -> Rect
fn get_preferred_rect( &self, app: &App, parent_box: AnyRenderBox, offset: Offset, slider_theme: &SliderThemeData, is_enabled: Option<bool>, is_discrete: Option<bool>, ) -> Rect
Slider. Read moreimpl Copy for RectangularRangeSliderTrackShape
Source§impl RangeSliderTrackShape for RectangularRangeSliderTrackShape
impl RangeSliderTrackShape for RectangularRangeSliderTrackShape
Source§fn eq_shape(&self, other: &dyn RangeSliderTrackShape) -> bool
fn eq_shape(&self, other: &dyn RangeSliderTrackShape) -> bool
Value equality, as Dart’s canonicalized const instances are identical.