pub struct ButtonTheme {Show 17 fields
pub background_color: Option<Rgba>,
pub primary_background: Option<Rgba>,
pub primary_text_color: Option<Rgba>,
pub min_width: Option<f32>,
pub min_height: Option<f32>,
pub icon_text_gap: Option<f32>,
pub disabled_opacity: Option<f32>,
pub hover_background: Option<Rgba>,
pub hover_text_color: Option<Rgba>,
pub active_text_color: Option<Rgba>,
pub disabled_text_color: Option<Rgba>,
pub active_background: Option<Rgba>,
pub disabled_background: Option<Rgba>,
pub checked_background: Option<Rgba>,
pub checked_text_color: Option<Rgba>,
pub font: Option<FontSpec>,
pub border: Option<WidgetBorderSpec>,
}Expand description
Push button: colors, sizing, spacing, geometry.
Fields§
§background_color: Option<Rgba>Default button background fill.
primary_background: Option<Rgba>Primary / accent button background fill.
primary_text_color: Option<Rgba>Primary / accent button text/icon color.
min_width: Option<f32>Minimum button width in logical pixels.
min_height: Option<f32>Minimum button height in logical pixels.
icon_text_gap: Option<f32>Space between icon and label.
disabled_opacity: Option<f32>Opacity multiplier when the button is disabled (0.0-1.0), applied to
the whole button on top of its disabled colours (see
ThemeDefaults::disabled_opacity).
hover_background: Option<Rgba>Button background on hover.
hover_text_color: Option<Rgba>Button text color on hover.
active_text_color: Option<Rgba>Button text color when pressed/active.
disabled_text_color: Option<Rgba>Button text color when disabled.
active_background: Option<Rgba>Button background when pressed/active.
disabled_background: Option<Rgba>Button background when disabled; None, the enabled background.
checked_background: Option<Rgba>Background of a toggle button that is on (checked): Breeze’s
Button mixed an eighth towards ButtonText, WinUI’s accent fill,
libadwaita’s pressed fill, Material’s secondary. None where the
platform states none (AppKit); a connector then shows the pressed
pair, active_background and active_text_color
(docs/platform-facts.md §2.3).
checked_text_color: Option<Rgba>Label color of a toggle button that is on; None, as for
checked_background, the pressed pair’s (docs/platform-facts.md §2.3).
font: Option<FontSpec>Button label font specification.
border: Option<WidgetBorderSpec>Button border specification.
Implementations§
Source§impl ButtonTheme
impl ButtonTheme
Sourcepub const FIELD_NAMES: &[&str]
pub const FIELD_NAMES: &[&str]
All serialized field names for this widget theme, for TOML linting.