pub struct ComputedScrollbarStyle {Show 19 fields
pub width_mode: LayoutScrollbarWidth,
pub visual_width_px: f32,
pub reserve_width_px: f32,
pub thumb_color: ColorU,
pub track_color: ColorU,
pub button_color: ColorU,
pub corner_color: ColorU,
pub clip_to_container_border: bool,
pub fade_delay_ms: u32,
pub fade_duration_ms: u32,
pub visibility: ScrollbarVisibilityMode,
pub show_scroll_buttons: bool,
pub scroll_button_size_px: f32,
pub show_corner_rect: bool,
pub thumb_color_hover: Option<ColorU>,
pub thumb_color_active: Option<ColorU>,
pub track_color_hover: Option<ColorU>,
pub visual_width_px_hover: Option<f32>,
pub visual_width_px_active: Option<f32>,
}Expand description
Computed scrollbar style for a node.
All visual defaults (colors, width) come from the UA CSS conditional rules
in core/src/ua_css.rs — individual CssPropertyWithConditions entries for
scrollbar-color and scrollbar-width, keyed on @os / @theme.
Overlay behaviour (fade timing, visibility, clip) is derived from the
resolved scrollbar-width mode:
thin→ overlay: fade 500/200 ms,WhenScrolling, clip = trueauto→ classic: no fade,Always, clip = falsenone→ hidden: no fade,Always, clip = false
Per-node CSS overrides (in priority order):
-azul-scrollbar-style(fullScrollbarInfooverride)scrollbar-width(overrides width + overlay mode)scrollbar-color(overrides thumb / track colours)
Fields§
§width_mode: LayoutScrollbarWidthThe scrollbar width mode (auto/thin/none)
visual_width_px: f32Visual width in pixels — used for rendering track + thumb. Non-zero even for overlay scrollbars.
reserve_width_px: f32Reserve width in pixels — layout space subtracted from content area.
0 for overlay scrollbars, equal to visual_width_px for legacy.
thumb_color: ColorUThumb color
track_color: ColorUTrack color
Button color (for scroll arrows)
corner_color: ColorUCorner color (where scrollbars meet)
clip_to_container_border: boolWhether to clip the scrollbar to the container’s border-radius
fade_delay_ms: u32Delay in ms before scrollbar starts fading out (0 = never fade)
fade_duration_ms: u32Duration of fade-out animation in ms (0 = instant)
visibility: ScrollbarVisibilityModeScrollbar visibility mode (always / when-scrolling / auto)
Whether to show top/bottom (or left/right) arrow buttons. When false, the track spans the entire scrollbar length.
Size of each arrow button in px (square: width = height).
Only used when show_scroll_buttons == true.
show_corner_rect: boolWhether to show the corner rect where V and H scrollbars meet.
thumb_color_hover: Option<ColorU>Thumb color when hovered (None = use thumb_color)
thumb_color_active: Option<ColorU>Thumb color when pressed/active (None = use thumb_color)
track_color_hover: Option<ColorU>Track color when hovered (None = use track_color)
visual_width_px_hover: Option<f32>Visual width when hovered (None = use visual_width_px)
visual_width_px_active: Option<f32>Visual width when pressed (None = use visual_width_px)
Trait Implementations§
Source§impl Clone for ComputedScrollbarStyle
impl Clone for ComputedScrollbarStyle
Source§fn clone(&self) -> ComputedScrollbarStyle
fn clone(&self) -> ComputedScrollbarStyle
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ComputedScrollbarStyle
impl Debug for ComputedScrollbarStyle
Auto Trait Implementations§
impl Freeze for ComputedScrollbarStyle
impl RefUnwindSafe for ComputedScrollbarStyle
impl Send for ComputedScrollbarStyle
impl Sync for ComputedScrollbarStyle
impl Unpin for ComputedScrollbarStyle
impl UnsafeUnpin for ComputedScrollbarStyle
impl UnwindSafe for ComputedScrollbarStyle
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more