pub struct ScrollbarStyle {
pub visibility: ScrollbarVisibility,
pub color: Color,
pub track_color: Option<Color>,
pub thickness: f32,
pub radius: f32,
pub inset: f32,
pub min_thumb_length: f32,
}Expand description
Full scrollbar appearance + behavior, set with ScrollView::scrollbar_style.
The individual .scrollbar_color()/.no_scrollbar() shorthands still work
and just edit this struct’s fields.
Fields§
§visibility: ScrollbarVisibility§color: ColorThumb fill.
track_color: Option<Color>Track background drawn behind the thumb along the whole scrollable
edge. None (default) draws no track, matching the previous
thumb-only look.
thickness: f32Thumb (and track) thickness in logical px.
radius: f32Corner radius — 0.0 for the previous square-cornered look.
inset: f32Gap between the thumb and the viewport’s far edge.
min_thumb_length: f32Floor on the thumb’s drawn length so a huge content/viewport ratio never shrinks it down to an unclickable sliver.
Trait Implementations§
Source§impl Clone for ScrollbarStyle
impl Clone for ScrollbarStyle
Source§fn clone(&self) -> ScrollbarStyle
fn clone(&self) -> ScrollbarStyle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ScrollbarStyle
Source§impl Debug for ScrollbarStyle
impl Debug for ScrollbarStyle
Auto Trait Implementations§
impl Freeze for ScrollbarStyle
impl RefUnwindSafe for ScrollbarStyle
impl Send for ScrollbarStyle
impl Sync for ScrollbarStyle
impl Unpin for ScrollbarStyle
impl UnsafeUnpin for ScrollbarStyle
impl UnwindSafe 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