#[repr(C)]pub enum ScrollbarVisibilityMode {
Always = 0,
WhenScrolling = 1,
Auto = 2,
}Expand description
Controls when the scrollbar is displayed.
This is a per-element CSS property (-azul-scrollbar-visibility) that
determines the scrollbar presentation style. It interacts with the
OS-level ScrollbarPreferences.visibility (from System Preferences)
when set to Auto.
Always: Classic, always-visible scrollbar (Chrome/Windows/Linux default). Scrollbar reserves layout space.WhenScrolling: Overlay scrollbar that fades in on scroll activity and fades out after a delay. Does not reserve layout space.Auto: Use the OS preference. On macOS this typically meansWhenScrolling, on Windows/Linux this typically meansAlways.
Variants§
Always = 0
Scrollbar is always visible (Chrome/Windows/Linux default). Reserves layout space.
WhenScrolling = 1
Scrollbar appears on scroll and fades out after inactivity. Does not reserve layout space (overlay).
Auto = 2
Use the OS-level scrollbar preference.
Trait Implementations§
Source§impl Clone for ScrollbarVisibilityMode
impl Clone for ScrollbarVisibilityMode
Source§fn clone(&self) -> ScrollbarVisibilityMode
fn clone(&self) -> ScrollbarVisibilityMode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ScrollbarVisibilityMode
impl Debug for ScrollbarVisibilityMode
Source§impl Default for ScrollbarVisibilityMode
impl Default for ScrollbarVisibilityMode
Source§fn default() -> ScrollbarVisibilityMode
fn default() -> ScrollbarVisibilityMode
Returns the “default value” for a type. Read more
Source§impl FormatAsRustCode for ScrollbarVisibilityMode
impl FormatAsRustCode for ScrollbarVisibilityMode
fn format_as_rust_code(&self, _tabs: usize) -> String
Source§impl From<ScrollbarVisibilityMode> for CssProperty
impl From<ScrollbarVisibilityMode> for CssProperty
Source§fn from(e: ScrollbarVisibilityMode) -> Self
fn from(e: ScrollbarVisibilityMode) -> Self
Converts to this type from the input type.
Source§impl Hash for ScrollbarVisibilityMode
impl Hash for ScrollbarVisibilityMode
Source§impl Ord for ScrollbarVisibilityMode
impl Ord for ScrollbarVisibilityMode
Source§fn cmp(&self, other: &ScrollbarVisibilityMode) -> Ordering
fn cmp(&self, other: &ScrollbarVisibilityMode) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ScrollbarVisibilityMode
impl PartialEq for ScrollbarVisibilityMode
Source§fn eq(&self, other: &ScrollbarVisibilityMode) -> bool
fn eq(&self, other: &ScrollbarVisibilityMode) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for ScrollbarVisibilityMode
impl PartialOrd for ScrollbarVisibilityMode
Source§impl PrintAsCssValue for ScrollbarVisibilityMode
impl PrintAsCssValue for ScrollbarVisibilityMode
fn print_as_css_value(&self) -> String
impl Copy for ScrollbarVisibilityMode
impl Eq for ScrollbarVisibilityMode
impl StructuralPartialEq for ScrollbarVisibilityMode
Auto Trait Implementations§
impl Freeze for ScrollbarVisibilityMode
impl RefUnwindSafe for ScrollbarVisibilityMode
impl Send for ScrollbarVisibilityMode
impl Sync for ScrollbarVisibilityMode
impl Unpin for ScrollbarVisibilityMode
impl UnsafeUnpin for ScrollbarVisibilityMode
impl UnwindSafe for ScrollbarVisibilityMode
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