pub struct ScrollbarStyle {
pub thickness: Dp,
pub track_inset: Dp,
pub track_cross_inset: Dp,
pub min_thumb_length: Dp,
pub thumb_max_length_fraction: f32,
pub fixed_thumb_length: Option<Dp>,
pub radius: Option<Dp>,
pub track_visuals: ControlVisualSet,
pub thumb_visuals: ControlVisualSet,
pub fade_enabled: bool,
pub fade_delay_ms: u64,
pub fade_duration_ms: u64,
}Fields§
§thickness: Dp§track_inset: Dp§track_cross_inset: DpCross-axis inset of the track (M3 crossAxisTrackInset, default 0).
The vertical bar sits this far from the end edge; the horizontal bar
this far from the bottom edge.
min_thumb_length: Dp§thumb_max_length_fraction: f32Maximum thumb length as a fraction of the track (M3
thumbMaxLengthFraction, default 0.9).
fixed_thumb_length: Option<Dp>§radius: Option<Dp>§track_visuals: ControlVisualSet§thumb_visuals: ControlVisualSet§fade_enabled: boolM3 isFadeEnabled: the bar shows while scrolling (or while hovered /
pressed) and fades out after fade_delay_ms. When false the bar is
always fully visible.
fade_delay_ms: u64M3 fadeDelayMillis: idle time before the fade starts.
fade_duration_ms: u64M3 fadeDurationMillis: length of the fade animation.
Implementations§
Source§impl ScrollbarStyle
impl ScrollbarStyle
pub fn with_thickness(self, thickness: Dp) -> Self
pub fn with_track_inset(self, track_inset: Dp) -> Self
pub fn with_track_cross_inset(self, track_cross_inset: Dp) -> Self
pub fn with_thumb_max_length_fraction(self, fraction: f32) -> Self
pub fn with_fade_enabled(self, fade_enabled: bool) -> Self
pub fn with_fade_delay_ms(self, fade_delay_ms: u64) -> Self
pub fn with_fade_duration_ms(self, fade_duration_ms: u64) -> Self
pub fn with_min_thumb_length(self, min_thumb_length: Dp) -> Self
pub fn with_fixed_thumb_length(self, length: Option<Dp>) -> Self
pub fn with_radius(self, radius: Option<Dp>) -> Self
pub fn with_track_visuals(self, visuals: ControlVisualSet) -> Self
pub fn with_thumb_visuals(self, visuals: ControlVisualSet) -> Self
Trait Implementations§
Source§impl Clone for ScrollbarStyle
impl Clone for ScrollbarStyle
Source§impl Debug for ScrollbarStyle
impl Debug for ScrollbarStyle
Source§impl Default for ScrollbarStyle
impl Default for ScrollbarStyle
Source§impl PartialEq for ScrollbarStyle
impl PartialEq for ScrollbarStyle
impl StructuralPartialEq for ScrollbarStyle
Auto Trait Implementations§
impl !RefUnwindSafe for ScrollbarStyle
impl !Send for ScrollbarStyle
impl !Sync for ScrollbarStyle
impl !UnwindSafe for ScrollbarStyle
impl Freeze for ScrollbarStyle
impl Unpin for ScrollbarStyle
impl UnsafeUnpin for ScrollbarStyle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more