pub struct DatePickerStyle {
pub base: PickerBaseStyle,
pub popup_width: f32,
pub header_height: f32,
pub week_height: f32,
pub cell_height: f32,
}Expand description
Calendar popup geometry layered on PickerBaseStyle.
§Examples
use ailloli_ui_widgets::controls::DatePickerStyle;
let style = DatePickerStyle::default();
assert_eq!((style.popup_width, style.header_height, style.week_height, style.cell_height),
(306.0, 36.0, 24.0, 34.0));Fields§
§base: PickerBaseStyleShared trigger and popup tokens.
popup_width: f32Calendar popup width in logical pixels.
header_height: f32Month header height in logical pixels.
week_height: f32Weekday header height in logical pixels.
cell_height: f32Six-row calendar cell height in logical pixels.
Implementations§
Source§impl DatePickerStyle
impl DatePickerStyle
Sourcepub fn from_theme(theme: Theme, size: DatePickerSize) -> Self
pub fn from_theme(theme: Theme, size: DatePickerSize) -> Self
Derives calendar style and geometry from theme and density.
Compact uses popup width/cell height 270/30; default uses 306/34.
Header and weekday heights remain 36/24 logical pixels.
§Examples
use ailloli_ui_core::Theme;
use ailloli_ui_widgets::controls::{DatePickerSize, DatePickerStyle};
let style = DatePickerStyle::from_theme(Theme::default(), DatePickerSize::Compact);
assert_eq!((style.base.width, style.base.height, style.popup_width), (180.0, 30.0, 270.0));Trait Implementations§
Source§impl Clone for DatePickerStyle
impl Clone for DatePickerStyle
Source§fn clone(&self) -> DatePickerStyle
fn clone(&self) -> DatePickerStyle
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 moreSource§impl Debug for DatePickerStyle
impl Debug for DatePickerStyle
Source§impl Default for DatePickerStyle
impl Default for DatePickerStyle
Source§impl PartialEq for DatePickerStyle
impl PartialEq for DatePickerStyle
impl StructuralPartialEq for DatePickerStyle
Auto Trait Implementations§
impl Freeze for DatePickerStyle
impl RefUnwindSafe for DatePickerStyle
impl Send for DatePickerStyle
impl Sync for DatePickerStyle
impl Unpin for DatePickerStyle
impl UnwindSafe for DatePickerStyle
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.