pub struct ScrollSpec {Show 15 fields
pub floating: bool,
pub bar_width: f32,
pub handle_min_length: f32,
pub bar_inner_margin: f32,
pub bar_outer_margin: f32,
pub floating_width: f32,
pub floating_allocated_width: f32,
pub foreground_color: bool,
pub dormant_background_opacity: f32,
pub active_background_opacity: f32,
pub interact_background_opacity: f32,
pub dormant_handle_opacity: f32,
pub active_handle_opacity: f32,
pub interact_handle_opacity: f32,
pub visibility: ScrollVisibility,
}Expand description
All 14 ScrollStyle knobs + the visibility default, serialisable. The six
opacity fields make a macOS bar dormant-invisible until hover.
Fields§
§floating: bool§bar_width: f32§handle_min_length: f32§bar_inner_margin: f32§bar_outer_margin: f32§floating_width: f32§floating_allocated_width: f32§foreground_color: bool§dormant_background_opacity: f32§active_background_opacity: f32§interact_background_opacity: f32§dormant_handle_opacity: f32§active_handle_opacity: f32§interact_handle_opacity: f32§visibility: ScrollVisibilityImplementations§
Source§impl ScrollSpec
impl ScrollSpec
Sourcepub fn to_scroll_style(&self) -> ScrollStyle
pub fn to_scroll_style(&self) -> ScrollStyle
Build an egui ScrollStyle, modelling the 14 work-order fields and
inheriting egui’s defaults for the rest (content_margin, fade, which
0.34 added beyond the spec). Starting from solid()/floating() keeps us
forward-compatible with future egui fields.
Trait Implementations§
Source§impl Clone for ScrollSpec
impl Clone for ScrollSpec
Source§fn clone(&self) -> ScrollSpec
fn clone(&self) -> ScrollSpec
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 moreimpl Copy for ScrollSpec
Source§impl Debug for ScrollSpec
impl Debug for ScrollSpec
Source§impl Default for ScrollSpec
impl Default for ScrollSpec
Source§impl<'de> Deserialize<'de> for ScrollSpec
impl<'de> Deserialize<'de> for ScrollSpec
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ScrollSpec
impl PartialEq for ScrollSpec
Source§fn eq(&self, other: &ScrollSpec) -> bool
fn eq(&self, other: &ScrollSpec) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ScrollSpec
impl Serialize for ScrollSpec
impl StructuralPartialEq for ScrollSpec
Auto Trait Implementations§
impl Freeze for ScrollSpec
impl RefUnwindSafe for ScrollSpec
impl Send for ScrollSpec
impl Sync for ScrollSpec
impl Unpin for ScrollSpec
impl UnsafeUnpin for ScrollSpec
impl UnwindSafe for ScrollSpec
Blanket Implementations§
impl<T> Allocation for T
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