pub struct ScrollbarDrawInfo {Show 17 fields
pub bounds: WindowLogicalRect,
pub orientation: ScrollbarOrientation,
pub track_bounds: WindowLogicalRect,
pub track_color: ColorU,
pub thumb_bounds: WindowLogicalRect,
pub thumb_color: ColorU,
pub thumb_border_radius: BorderRadius,
pub button_decrement_bounds: Option<WindowLogicalRect>,
pub button_increment_bounds: Option<WindowLogicalRect>,
pub button_color: ColorU,
pub opacity_key: Option<OpacityKey>,
pub thumb_transform_key: Option<TransformKey>,
pub thumb_initial_transform: ComputedTransform3D,
pub hit_id: Option<ScrollbarHitId>,
pub clip_to_container_border: bool,
pub container_border_radius: BorderRadius,
pub visibility: ScrollbarVisibilityMode,
}Expand description
Complete drawing information for a scrollbar with all visual components.
This contains the resolved geometry and colors for all scrollbar parts:
- Track: The background area where the thumb slides
- Thumb: The draggable indicator showing current scroll position
- Buttons: Optional up/down or left/right arrow buttons
- Corner: The area where horizontal and vertical scrollbars meet
Fields§
§bounds: WindowLogicalRectOverall bounds of the entire scrollbar (including track and buttons)
orientation: ScrollbarOrientationScrollbar orientation (horizontal or vertical)
track_bounds: WindowLogicalRectBounds of the track area
track_color: ColorUColor of the track background
thumb_bounds: WindowLogicalRectBounds of the thumb
thumb_color: ColorUColor of the thumb
thumb_border_radius: BorderRadiusBorder radius for rounded thumb corners
Optional decrement button bounds (up/left arrow)
Optional increment button bounds (down/right arrow)
Color for buttons
opacity_key: Option<OpacityKey>Optional opacity key for GPU-side fading animation.
thumb_transform_key: Option<TransformKey>Optional transform key for GPU-side scrollbar thumb positioning. When present, the compositor will wrap the thumb in a PushReferenceFrame with PropertyBinding::Binding so WebRender can animate the thumb position without rebuilding the display list.
thumb_initial_transform: ComputedTransform3DInitial transform for the scrollbar thumb (current scroll position). This is the transform applied when the display list is first built. During GPU-only scroll, synchronize_gpu_values updates this dynamically.
hit_id: Option<ScrollbarHitId>Optional hit-test ID for WebRender hit-testing.
clip_to_container_border: boolWhether to clip scrollbar to container’s border-radius
container_border_radius: BorderRadiusContainer’s border-radius (for clipping)
visibility: ScrollbarVisibilityModeScrollbar visibility mode — used by back-registration to choose initial opacity.
Always → initial opacity 1.0; WhenScrolling → initial opacity 0.0.
Trait Implementations§
Source§impl Clone for ScrollbarDrawInfo
impl Clone for ScrollbarDrawInfo
Source§fn clone(&self) -> ScrollbarDrawInfo
fn clone(&self) -> ScrollbarDrawInfo
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ScrollbarDrawInfo
impl RefUnwindSafe for ScrollbarDrawInfo
impl Send for ScrollbarDrawInfo
impl Sync for ScrollbarDrawInfo
impl Unpin for ScrollbarDrawInfo
impl UnsafeUnpin for ScrollbarDrawInfo
impl UnwindSafe for ScrollbarDrawInfo
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