pub struct RadioStyle {Show 19 fields
pub outer_fill: Color,
pub outer_fill_hovered: Color,
pub outer_fill_pressed: Color,
pub selected_fill: Color,
pub dot_fill: Color,
pub disabled_fill: Color,
pub border: Border,
pub selected_border: Border,
pub focus_ring: Border,
pub text: TextStyle,
pub disabled_text: TextStyle,
pub outer_size: f32,
pub dot_size: f32,
pub option_height: f32,
pub label_gap: f32,
pub option_gap: f32,
pub option_padding_x: f32,
pub focus_ring_offset: f32,
pub disabled_opacity: f32,
}Expand description
Resolved radio colors, typography, and logical-pixel geometry.
Custom geometry is not validated; non-finite values can propagate into layout/paint calculations.
§Examples
use ailloli_ui_core::Theme;
use ailloli_ui_widgets::controls::{RadioSize, RadioStyle};
let style = RadioStyle::from_theme(Theme::dark(), RadioSize::Compact);
assert_eq!((style.outer_size, style.dot_size, style.option_height), (14.0, 7.0, 24.0));Fields§
§outer_fill: ColorResting unchecked outer-circle fill.
outer_fill_hovered: ColorHovered unchecked outer-circle fill.
outer_fill_pressed: ColorPressed unchecked outer-circle fill.
selected_fill: ColorChecked outer-circle fill.
dot_fill: ColorChecked inner-dot fill.
disabled_fill: ColorDisabled outer-circle fill.
border: BorderUnchecked outer-circle border.
selected_border: BorderChecked outer-circle border.
focus_ring: BorderFocus border around the outer circle.
text: TextStyleEnabled label style.
disabled_text: TextStyleDisabled label style.
outer_size: f32Outer-circle diameter in logical pixels.
dot_size: f32Inner-dot diameter in logical pixels.
option_height: f32Per-option row height in logical pixels.
label_gap: f32Space between circle and label in logical pixels.
option_gap: f32Space between group options in logical pixels.
option_padding_x: f32Horizontal inset before circle and after label in logical pixels.
focus_ring_offset: f32Focus-ring inflation beyond the outer circle in logical pixels.
disabled_opacity: f32Alpha multiplier applied to disabled visuals.
Implementations§
Source§impl RadioStyle
impl RadioStyle
Sourcepub fn from_theme(theme: Theme, size: RadioSize) -> Self
pub fn from_theme(theme: Theme, size: RadioSize) -> Self
Resolves radio styling from a theme and built-in size.
§Examples
use ailloli_ui_core::Theme;
use ailloli_ui_widgets::controls::{RadioSize, RadioStyle};
let style = RadioStyle::from_theme(Theme::default(), RadioSize::Default);
assert_eq!((style.outer_size, style.dot_size), (16.0, 8.0));
assert_eq!((style.label_gap, style.option_gap), (8.0, 6.0));Trait Implementations§
Source§impl Clone for RadioStyle
impl Clone for RadioStyle
Source§fn clone(&self) -> RadioStyle
fn clone(&self) -> RadioStyle
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RadioStyle
impl Debug for RadioStyle
Source§impl Default for RadioStyle
impl Default for RadioStyle
Source§impl PartialEq for RadioStyle
impl PartialEq for RadioStyle
impl StructuralPartialEq for RadioStyle
Auto Trait Implementations§
impl Freeze for RadioStyle
impl RefUnwindSafe for RadioStyle
impl Send for RadioStyle
impl Sync for RadioStyle
impl Unpin for RadioStyle
impl UnwindSafe for RadioStyle
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.