pub struct ListItemStyle {Show 20 fields
pub height: f32,
pub subtitle_height: f32,
pub padding_x: f32,
pub gap: f32,
pub icon_size: f32,
pub radius: Radius,
pub background: Color,
pub hover_background: Color,
pub pressed_background: Color,
pub selected_background: Color,
pub title_text: TextStyle,
pub subtitle_text: TextStyle,
pub trailing_text: TextStyle,
pub danger_text: TextStyle,
pub icon_tint: Color,
pub selected_icon_tint: Color,
pub badge_background: Color,
pub badge_text: TextStyle,
pub focus_ring: Border,
pub disabled_opacity: f32,
}Expand description
Fields§
§height: f32Intrinsic height without a subtitle.
subtitle_height: f32Intrinsic height whenever subtitle is Some, even if empty.
padding_x: f32Horizontal content inset.
gap: f32Gap between content regions.
icon_size: f32Width and height of an optional leading icon.
radius: RadiusBackground and focus-ring corner radii.
background: ColorIdle background.
hover_background: ColorActionable enabled hover background.
pressed_background: ColorActionable enabled pressed background.
selected_background: ColorBackground used whenever selected.
title_text: TextStyleNormal title style.
subtitle_text: TextStyleSubtitle style.
trailing_text: TextStyleRight-aligned trailing text style.
danger_text: TextStyleTitle style for ListItemVariant::Danger.
icon_tint: ColorUnselected leading-icon tint.
selected_icon_tint: ColorSelected leading-icon tint and default selected-title color.
badge_background: ColorNumeric badge background.
badge_text: TextStyleNumeric badge text style.
focus_ring: BorderBorder painted for focused, enabled, actionable items.
disabled_opacity: f32Alpha multiplier for disabled backgrounds, icons, and text.
Implementations§
Source§impl ListItemStyle
impl ListItemStyle
Sourcepub fn from_theme(theme: Theme) -> Self
pub fn from_theme(theme: Theme) -> Self
Resolves row colors, typography, and geometry from theme.
§Examples
use ailloli_ui_core::Theme;
use ailloli_ui_widgets::controls::ListItemStyle;
let style = ListItemStyle::from_theme(Theme::dark());
assert_eq!(style.icon_size, 16.0);
assert_eq!(style.disabled_opacity, 0.42);Trait Implementations§
Source§impl Clone for ListItemStyle
impl Clone for ListItemStyle
Source§fn clone(&self) -> ListItemStyle
fn clone(&self) -> ListItemStyle
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ListItemStyle
impl Debug for ListItemStyle
Source§impl Default for ListItemStyle
impl Default for ListItemStyle
Source§impl PartialEq for ListItemStyle
impl PartialEq for ListItemStyle
impl StructuralPartialEq for ListItemStyle
Auto Trait Implementations§
impl Freeze for ListItemStyle
impl RefUnwindSafe for ListItemStyle
impl Send for ListItemStyle
impl Sync for ListItemStyle
impl Unpin for ListItemStyle
impl UnwindSafe for ListItemStyle
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
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.