pub struct DisclosureRowStyle {Show 17 fields
pub height: f32,
pub padding_x: f32,
pub gap: f32,
pub icon_size: f32,
pub chevron_size: f32,
pub radius: Radius,
pub background: Color,
pub hover_background: Color,
pub pressed_background: Color,
pub selected_background: Color,
pub text: TextStyle,
pub trailing_text: TextStyle,
pub danger_text: TextStyle,
pub icon_tint: Color,
pub chevron_tint: Color,
pub focus_ring: Border,
pub disabled_opacity: f32,
}Expand description
Resolved colors, typography, and logical-pixel metrics for a disclosure row.
§Examples
use ailloli_ui_core::Theme;
use ailloli_ui_widgets::controls::DisclosureRowStyle;
let style = DisclosureRowStyle::from_theme(Theme::dark());
assert_eq!(style.height, 38.0);
assert_eq!(style.disabled_opacity, 0.42);Fields§
§height: f32Intrinsic row height in logical pixels.
padding_x: f32Leading and trailing inset in logical pixels.
gap: f32Gap between content regions in logical pixels.
icon_size: f32Width and height of the optional leading icon in logical pixels.
chevron_size: f32Width and height of the disclosure chevron in logical pixels.
radius: RadiusBackground and focus-ring corner radii.
background: ColorIdle background color.
hover_background: ColorBackground used while an actionable row is hovered.
pressed_background: ColorBackground used while an actionable row is pressed.
selected_background: ColorBackground used whenever the selected binding is true.
text: TextStyleDefault label style.
trailing_text: TextStyleOptional trailing-label style.
danger_text: TextStyleLabel style for DisclosureRowVariant::Danger.
icon_tint: ColorLeading-icon tint.
chevron_tint: ColorChevron tint.
focus_ring: BorderBorder painted for a focused, enabled, actionable row.
disabled_opacity: f32Alpha multiplier for disabled backgrounds, icons, and text.
Implementations§
Source§impl DisclosureRowStyle
impl DisclosureRowStyle
Sourcepub fn from_theme(theme: Theme) -> Self
pub fn from_theme(theme: Theme) -> Self
Resolves row colors and metrics from theme.
The returned opacity is 0.42; values are not clamped if the caller
later mutates the public fields.
§Examples
use ailloli_ui_core::Theme;
use ailloli_ui_widgets::controls::DisclosureRowStyle;
let style = DisclosureRowStyle::from_theme(Theme::dark());
assert_eq!(style.padding_x, 12.0);
assert_eq!(style.icon_size, 16.0);Trait Implementations§
Source§impl Clone for DisclosureRowStyle
impl Clone for DisclosureRowStyle
Source§fn clone(&self) -> DisclosureRowStyle
fn clone(&self) -> DisclosureRowStyle
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DisclosureRowStyle
impl Debug for DisclosureRowStyle
Source§impl Default for DisclosureRowStyle
impl Default for DisclosureRowStyle
Source§impl PartialEq for DisclosureRowStyle
impl PartialEq for DisclosureRowStyle
impl StructuralPartialEq for DisclosureRowStyle
Auto Trait Implementations§
impl Freeze for DisclosureRowStyle
impl RefUnwindSafe for DisclosureRowStyle
impl Send for DisclosureRowStyle
impl Sync for DisclosureRowStyle
impl Unpin for DisclosureRowStyle
impl UnwindSafe for DisclosureRowStyle
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.