pub struct ScrollbarStyle {
pub track_color: Color,
pub thumb_color: Color,
pub thickness: f32,
pub min_thumb_len: f32,
pub inset: f32,
pub radius: f32,
}Expand description
Visual style for ScrollView scrollbars.
All dimensions are logical pixels. The default is a six-pixel bar inset by three pixels with a minimum 24-pixel thumb. Custom values are not normalized globally; unusable track geometry simply suppresses that scrollbar.
§Examples
use ailloli_ui_widgets::layout::ScrollbarStyle;
let style = ScrollbarStyle::default();
assert_eq!(style.thickness, 6.0);
assert_eq!(style.min_thumb_len, 24.0);Fields§
§track_color: ColorScrollbar track fill.
thumb_color: ColorScrollbar thumb fill.
thickness: f32Track/thumb cross-axis thickness in logical pixels.
min_thumb_len: f32Minimum main-axis thumb length in logical pixels, capped to the track.
inset: f32Distance from viewport edges in logical pixels.
radius: f32Track and thumb corner radius in logical pixels.
Trait Implementations§
Source§impl Clone for ScrollbarStyle
impl Clone for ScrollbarStyle
Source§fn clone(&self) -> ScrollbarStyle
fn clone(&self) -> ScrollbarStyle
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ScrollbarStyle
impl Debug for ScrollbarStyle
Source§impl Default for ScrollbarStyle
Supplies the standard neutral scrollbar palette and geometry.
impl Default for ScrollbarStyle
Supplies the standard neutral scrollbar palette and geometry.
Source§impl PartialEq for ScrollbarStyle
impl PartialEq for ScrollbarStyle
impl Copy for ScrollbarStyle
impl StructuralPartialEq 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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
§fn into_click_action(self) -> ClickAction<A>
fn into_click_action(self) -> ClickAction<A>
Implements the into_click_action helper used by this module.