pub struct AccordionStyle {Show 21 fields
pub background: Color,
pub border: Border,
pub focus_ring: Border,
pub header_background: Color,
pub header_hovered: Color,
pub header_pressed: Color,
pub header_open: Color,
pub title_text: TextStyle,
pub disabled_text: TextStyle,
pub icon_tint: Color,
pub disabled_icon_tint: Color,
pub radius: Radius,
pub header_height: f32,
pub padding: f32,
pub gap: f32,
pub header_padding_x: f32,
pub content_padding_x: f32,
pub content_padding_y: f32,
pub content_indent: f32,
pub icon_size: f32,
pub disabled_opacity: f32,
}Expand description
Resolved colors, typography, and logical-pixel metrics for an accordion.
content_padding_x and content_indent are reserved compatibility fields;
current content uses content_padding_y uniformly on all four edges.
§Examples
use ailloli_ui_core::Theme;
use ailloli_ui_widgets::controls::{AccordionSize, AccordionStyle};
let style = AccordionStyle::from_theme(Theme::dark(), AccordionSize::Compact);
assert_eq!(style.header_height, 30.0);
assert_eq!(style.title_text.px_size, 12);Fields§
§background: ColorOuter container fill.
border: BorderOuter container border.
focus_ring: BorderBorder painted around focused enabled headers.
header_background: ColorClosed idle header fill.
header_hovered: ColorClosed hovered header fill.
header_pressed: ColorClosed pressed header fill.
header_open: ColorOpen header fill, taking precedence over interaction fills.
title_text: TextStyleEnabled header title style.
disabled_text: TextStyleDisabled header title style.
icon_tint: ColorEnabled chevron tint.
disabled_icon_tint: ColorDisabled chevron tint before opacity multiplication.
radius: RadiusOuter/header corner radii.
header_height: f32Header intrinsic height.
padding: f32Outer container padding on every edge.
gap: f32Vertical gap between headers and mounted content.
header_padding_x: f32Header horizontal inset.
content_padding_x: f32Reserved horizontal content padding; currently unused.
content_padding_y: f32Current content padding applied uniformly on every edge.
content_indent: f32Reserved content indentation; currently unused.
icon_size: f32Chevron width and height.
disabled_opacity: f32Alpha multiplier applied to disabled header paint.
Implementations§
Source§impl AccordionStyle
impl AccordionStyle
Sourcepub fn from_theme(theme: Theme, size: AccordionSize) -> Self
pub fn from_theme(theme: Theme, size: AccordionSize) -> Self
Resolves accordion colors and geometry from theme and size.
§Examples
use ailloli_ui_core::Theme;
use ailloli_ui_widgets::controls::{AccordionSize, AccordionStyle};
let style = AccordionStyle::from_theme(Theme::dark(), AccordionSize::Default);
assert_eq!(style.header_height, 36.0);
assert_eq!(style.disabled_opacity, 0.42);Trait Implementations§
Source§impl Clone for AccordionStyle
impl Clone for AccordionStyle
Source§fn clone(&self) -> AccordionStyle
fn clone(&self) -> AccordionStyle
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AccordionStyle
impl Debug for AccordionStyle
Source§impl Default for AccordionStyle
impl Default for AccordionStyle
Source§impl PartialEq for AccordionStyle
impl PartialEq for AccordionStyle
impl StructuralPartialEq for AccordionStyle
Auto Trait Implementations§
impl Freeze for AccordionStyle
impl RefUnwindSafe for AccordionStyle
impl Send for AccordionStyle
impl Sync for AccordionStyle
impl Unpin for AccordionStyle
impl UnwindSafe for AccordionStyle
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.