pub struct RangeSwitcherConfig {Show 13 fields
pub ranges: Vec<DateRange>,
pub btn_height: f32,
pub btn_min_width: f32,
pub spacing: f32,
pub background_color: Color32,
pub active_color: Color32,
pub hover_color: Color32,
pub text_color: Color32,
pub active_text_color: Color32,
pub border_radius: f32,
pub font_size: f32,
pub show_border: bool,
pub border_color: Color32,
}Expand description
Configuration for the Range Switcher widget
Fields§
§ranges: Vec<DateRange>Available date ranges to show
btn_height: f32Button height in pixels
btn_min_width: f32Button min width in pixels
spacing: f32Spacing between btns
background_color: Color32Background color (inactive button)
active_color: Color32Active button background color
hover_color: Color32Hover background color
text_color: Color32Text color (inactive)
active_text_color: Color32Text color (active)
border_radius: f32Border radius
font_size: f32Font size
show_border: boolShow border around btns
border_color: Color32Border color
Implementations§
Source§impl RangeSwitcherConfig
impl RangeSwitcherConfig
Sourcepub fn from_theme(theme: &Theme) -> Self
pub fn from_theme(theme: &Theme) -> Self
Create config from theme
Sourcepub fn with_ranges(ranges: Vec<DateRange>) -> Self
pub fn with_ranges(ranges: Vec<DateRange>) -> Self
Create config with custom ranges
Trait Implementations§
Source§impl Clone for RangeSwitcherConfig
impl Clone for RangeSwitcherConfig
Source§fn clone(&self) -> RangeSwitcherConfig
fn clone(&self) -> RangeSwitcherConfig
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 RangeSwitcherConfig
impl Debug for RangeSwitcherConfig
Auto Trait Implementations§
impl Freeze for RangeSwitcherConfig
impl RefUnwindSafe for RangeSwitcherConfig
impl Send for RangeSwitcherConfig
impl Sync for RangeSwitcherConfig
impl Unpin for RangeSwitcherConfig
impl UnsafeUnpin for RangeSwitcherConfig
impl UnwindSafe for RangeSwitcherConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
Converts
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> ⓘ
Converts
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