pub struct ListStyle {
pub row_h: f32,
pub radius: f32,
pub title_fg: Color,
pub subtitle_fg: Color,
pub font: FontId,
pub title_px: u16,
pub subtitle_px: u16,
}Expand description
Logical-pixel geometry, typography, and colors for draw_list_rows.
Values are used as-is. Callers should provide a positive row_h; a zero or
negative height cannot make vertical progress through a large slice.
§Examples
use ailloli_ui_core::{Color, FontId};
use ailloli_ui_widgets::controls::list::ListStyle;
let style = ListStyle {
row_h: 44.0,
radius: 8.0,
title_fg: Color::WHITE,
subtitle_fg: Color::WHITE.with_alpha(0.7),
font: FontId::Ui,
title_px: 14,
subtitle_px: 12,
};
assert_eq!(style.row_h, 44.0);Fields§
§row_h: f32Height of each row in logical pixels.
radius: f32Background corner radius in logical pixels.
title_fg: ColorPrimary text color.
subtitle_fg: ColorSecondary text color.
font: FontIdFont used for both text lines.
title_px: u16Primary font size in logical pixels.
subtitle_px: u16Secondary font size in logical pixels.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ListStyle
impl RefUnwindSafe for ListStyle
impl Send for ListStyle
impl Sync for ListStyle
impl Unpin for ListStyle
impl UnwindSafe for ListStyle
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.