pub struct TimePickerStyle {
pub base: PickerBaseStyle,
pub popup_width: f32,
pub popup_height: f32,
pub row_height: f32,
}Expand description
Two-column time popup geometry layered on PickerBaseStyle.
§Examples
use ailloli_ui_widgets::controls::TimePickerStyle;
let style = TimePickerStyle::default();
assert_eq!((style.popup_width, style.popup_height, style.row_height), (240.0, 220.0, 30.0));Fields§
§base: PickerBaseStyleShared trigger and popup tokens.
popup_width: f32Popup width in logical pixels.
popup_height: f32Popup height in logical pixels.
row_height: f32Hour/minute row height in logical pixels.
Implementations§
Source§impl TimePickerStyle
impl TimePickerStyle
Sourcepub fn from_theme(theme: Theme, size: TimePickerSize) -> Self
pub fn from_theme(theme: Theme, size: TimePickerSize) -> Self
Derives time-list style and geometry from theme and density.
Compact uses popup 210 x 188 and 26-pixel rows; default uses
240 x 220 and 30-pixel rows.
§Examples
use ailloli_ui_core::Theme;
use ailloli_ui_widgets::controls::{TimePickerSize, TimePickerStyle};
let style = TimePickerStyle::from_theme(Theme::default(), TimePickerSize::Compact);
assert_eq!((style.popup_width, style.popup_height, style.row_height), (210.0, 188.0, 26.0));Trait Implementations§
Source§impl Clone for TimePickerStyle
impl Clone for TimePickerStyle
Source§fn clone(&self) -> TimePickerStyle
fn clone(&self) -> TimePickerStyle
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 TimePickerStyle
impl Debug for TimePickerStyle
Source§impl Default for TimePickerStyle
impl Default for TimePickerStyle
Source§impl PartialEq for TimePickerStyle
impl PartialEq for TimePickerStyle
impl StructuralPartialEq for TimePickerStyle
Auto Trait Implementations§
impl Freeze for TimePickerStyle
impl RefUnwindSafe for TimePickerStyle
impl Send for TimePickerStyle
impl Sync for TimePickerStyle
impl Unpin for TimePickerStyle
impl UnwindSafe for TimePickerStyle
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.