pub struct ComputedScrollbarStyle {
pub width: Option<LayoutWidth>,
pub thumb_color: Option<ColorU>,
pub track_color: Option<ColorU>,
pub handle_width: Option<f32>,
pub handle_radius: Option<f32>,
}Expand description
The final, resolved style for a scrollbar, after considering both standard and -webkit- properties. This struct is intended for use by the layout engine.
Fields§
§width: Option<LayoutWidth>The width of the scrollbar. None signifies scrollbar-width: none.
thumb_color: Option<ColorU>The color of the scrollbar thumb. None means use UA default.
track_color: Option<ColorU>The color of the scrollbar track. None means use UA default.
handle_width: Option<f32>How wide the HANDLE is, in logical px — which is not the same thing as how wide the scrollbar is.
Breeze draws a 6px handle centred in a 21px groove; Adwaita and macOS
also inset theirs. Deriving the handle from the groove instead produced
a handle that fills the whole track, which is why an azul scrollbar
read as a fat pill next to a native one. None = fill the groove
(the previous behaviour).
handle_radius: Option<f32>The handle’s corner radius in logical px. None = half the handle
width (a capsule), which is right for Breeze and Adwaita but wrong for
the square handles of older/classic styles — so it is a value the
platform gets to state rather than one the renderer assumes.
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 more