pub struct NavItemStyle {Show 19 fields
pub 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 text: TextStyle,
pub selected_text: TextStyle,
pub muted_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 row height.
padding_x: f32Horizontal content inset.
gap: f32Gap after a leading icon.
icon_size: f32Width and height of a leading icon.
radius: RadiusBackground and focus-ring radii.
background: ColorIdle background.
hover_background: ColorActionable enabled hover background.
pressed_background: ColorActionable enabled pressed background.
selected_background: ColorBackground used whenever selected.
text: TextStyleNormal label style.
selected_text: TextStyleSelected label style.
muted_text: TextStyleReserved secondary text style; current nav items do not paint it.
danger_text: TextStyleLabel style for NavItemVariant::Danger.
icon_tint: ColorUnselected leading-icon tint.
selected_icon_tint: ColorSelected leading-icon tint.
badge_background: ColorNumeric badge fill.
badge_text: TextStyleNumeric badge text style.
focus_ring: BorderBorder painted for focused, enabled, actionable items.
disabled_opacity: f32Alpha multiplier for disabled paint.
Implementations§
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::NavItemStyle;
let style = NavItemStyle::from_theme(Theme::dark());
assert_eq!(style.disabled_opacity, 0.42);
assert_eq!(style.badge_text.px_size, 11);Trait Implementations§
Source§fn clone(&self) -> NavItemStyle
fn clone(&self) -> NavItemStyle
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 moreAuto Trait Implementations§
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.