#[repr(C)]pub struct ScrollbarInfo {
pub width: LayoutWidth,
pub padding_left: LayoutPaddingLeft,
pub padding_right: LayoutPaddingRight,
pub track: StyleBackgroundContent,
pub thumb: StyleBackgroundContent,
pub button: StyleBackgroundContent,
pub corner: StyleBackgroundContent,
pub resizer: StyleBackgroundContent,
pub clip_to_container_border: bool,
pub scroll_behavior: ScrollBehavior,
pub overscroll_behavior_x: OverscrollBehavior,
pub overscroll_behavior_y: OverscrollBehavior,
}Expand description
Holds info necessary for layouting / styling -webkit-scrollbar properties.
Fields§
§width: LayoutWidthTotal width (or height for vertical scrollbars) of the scrollbar in pixels
padding_left: LayoutPaddingLeftPadding of the scrollbar tracker, in pixels. The inner bar is width - padding pixels
wide.
padding_right: LayoutPaddingRightPadding of the scrollbar (right)
track: StyleBackgroundContentStyle of the scrollbar background
(-webkit-scrollbar / -webkit-scrollbar-track / -webkit-scrollbar-track-piece
combined)
thumb: StyleBackgroundContentStyle of the scrollbar thumbs (the “up” / “down” arrows), (-webkit-scrollbar-thumb)
Styles the directional buttons on the scrollbar (-webkit-scrollbar-button)
corner: StyleBackgroundContentIf two scrollbars are present, addresses the (usually) bottom corner
of the scrollable element, where two scrollbars might meet (-webkit-scrollbar-corner)
resizer: StyleBackgroundContentAddresses the draggable resizing handle that appears above the
corner at the bottom corner of some elements (-webkit-resizer)
clip_to_container_border: boolWhether to clip the scrollbar to the container’s border-radius. When true, if the container has rounded corners, the scrollbar will be clipped to those rounded corners instead of having rectangular edges. Default is false for classic scrollbars, true for overlay scrollbars.
scroll_behavior: ScrollBehaviorScroll behavior for this scrollbar’s container (auto or smooth)
overscroll_behavior_x: OverscrollBehaviorOverscroll behavior for the X axis
overscroll_behavior_y: OverscrollBehaviorOverscroll behavior for the Y axis
Trait Implementations§
Source§impl Clone for ScrollbarInfo
impl Clone for ScrollbarInfo
Source§fn clone(&self) -> ScrollbarInfo
fn clone(&self) -> ScrollbarInfo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more