Struct EditorScrollbarStyle
pub struct EditorScrollbarStyle {
pub track_color: Color,
pub thumb_color: Color,
pub thickness: f32,
pub min_thumb_len: f32,
pub inset: f32,
pub radius: f32,
}Expand description
Visual style used by editor-owned scrollbars.
This mirrors the public ScrollView scrollbar defaults without depending on
ailloli_ui_widgets, because the editor engine is UI-adapter agnostic.
§Examples
use ailloli_ui_editor::EditorScrollbarStyle;
let style = EditorScrollbarStyle::default();
assert_eq!((style.thickness, style.min_thumb_len, style.inset, style.radius), (6.0, 24.0, 3.0, 3.0));Fields§
§track_color: ColorTrack color.
thumb_color: ColorScroll thumb color.
thickness: f32Overlay bar thickness in logical pixels.
min_thumb_len: f32Minimum thumb length in logical pixels.
inset: f32Distance from viewport edges in logical pixels.
radius: f32Thumb/track corner radius in logical pixels.
Trait Implementations§
§impl Clone for EditorScrollbarStyle
impl Clone for EditorScrollbarStyle
§fn clone(&self) -> EditorScrollbarStyle
fn clone(&self) -> EditorScrollbarStyle
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for EditorScrollbarStyle
impl Debug for EditorScrollbarStyle
§impl Default for EditorScrollbarStyle
Supplies conservative overlay-scrollbar defaults.
impl Default for EditorScrollbarStyle
Supplies conservative overlay-scrollbar defaults.
§fn default() -> EditorScrollbarStyle
fn default() -> EditorScrollbarStyle
Returns a 6 px bar with 24 px minimum thumb and 3 px inset/radius.
§impl PartialEq for EditorScrollbarStyle
impl PartialEq for EditorScrollbarStyle
impl Copy for EditorScrollbarStyle
impl StructuralPartialEq for EditorScrollbarStyle
Auto Trait Implementations§
impl Freeze for EditorScrollbarStyle
impl RefUnwindSafe for EditorScrollbarStyle
impl Send for EditorScrollbarStyle
impl Sync for EditorScrollbarStyle
impl Unpin for EditorScrollbarStyle
impl UnwindSafe for EditorScrollbarStyle
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
§fn into_click_action(self) -> ClickAction<A>
fn into_click_action(self) -> ClickAction<A>
Implements the into_click_action helper used by this module.