pub struct CheckboxTheme {Show 16 fields
pub background_color: Option<Rgba>,
pub checked_background: Option<Rgba>,
pub indicator_color: Option<Rgba>,
pub indicator_width: Option<f32>,
pub radio_indicator_width: Option<f32>,
pub radio_dot_diameter: Option<f32>,
pub check_mark_stroke_width: Option<f32>,
pub label_gap: Option<f32>,
pub disabled_opacity: Option<f32>,
pub disabled_text_color: Option<Rgba>,
pub hover_background: Option<Rgba>,
pub disabled_background: Option<Rgba>,
pub unchecked_background: Option<Rgba>,
pub unchecked_border_color: Option<Rgba>,
pub font: Option<FontSpec>,
pub border: Option<WidgetBorderSpec>,
}Expand description
Checkbox and radio button theme: colors, indicator, label font, border, and interactive states.
Fields§
§background_color: Option<Rgba>Checkbox background color.
checked_background: Option<Rgba>Indicator background when checked.
indicator_color: Option<Rgba>Indicator (check mark / radio dot) color.
indicator_width: Option<f32>Side length of the checkbox indicator (square), or diameter of the radio indicator (circle), in logical pixels: the whole indicator, not the mark drawn inside it (docs/platform-facts.md:980).
radio_indicator_width: Option<f32>Diameter of the radio indicator (circle) in logical pixels, where the
platform sizes it apart from the checkbox’s square: Material’s radio is
20 across, its checkbox 18. None where the platform sizes both alike,
and the radio is indicator_width across (docs/platform-facts.md §2.5).
radio_dot_diameter: Option<f32>Diameter of the filled dot a selected radio button draws at the centre
of its indicator, in logical pixels. None where the platform states
no dot size: AppKit draws its own (docs/platform-facts.md §2.5).
check_mark_stroke_width: Option<f32>Stroke width of the check mark a checked checkbox draws, in logical
pixels. None where the platform states none: WinUI’s mark is a font
glyph and AppKit publishes none (docs/platform-facts.md §2.5).
label_gap: Option<f32>Space between indicator and label.
disabled_opacity: Option<f32>Opacity multiplier when disabled (0.0-1.0), applied to the whole
widget on top of its disabled colours (see
ThemeDefaults::disabled_opacity).
disabled_text_color: Option<Rgba>Checkbox label text color when disabled.
hover_background: Option<Rgba>Checkbox background on hover.
disabled_background: Option<Rgba>Checkbox background when disabled; None, the enabled box of its
state (checked or unchecked).
unchecked_background: Option<Rgba>Indicator background when unchecked.
unchecked_border_color: Option<Rgba>Border color when unchecked.
font: Option<FontSpec>Checkbox label font specification.
border: Option<WidgetBorderSpec>Checkbox border specification.
Implementations§
Source§impl CheckboxTheme
impl CheckboxTheme
Sourcepub const FIELD_NAMES: &[&str]
pub const FIELD_NAMES: &[&str]
All serialized field names for this widget theme, for TOML linting.