pub struct ButtonTheme {Show 22 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 hover_border_color: Option<Rgba>,
pub focus_border_color: Option<Rgba>,
pub default_button_background: Option<Rgba>,
pub default_button_text_color: Option<Rgba>,
pub default_button_border_color: Option<Rgba>,
pub font: Option<FontSpec>,
pub border: Option<WidgetBorderSpec>,
}Expand description
Push button: colors, sizing, spacing, geometry.
Fields§
§background_color: Option<Rgba>Button background fill at rest.
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).
hover_border_color: Option<Rgba>Border colour of a hovered button, which a pressed button keeps (it is under
the pointer). None where the theme states none; a connector then draws
border.color (docs/platform-facts.md §2.3).
focus_border_color: Option<Rgba>Border colour of a button with the keyboard focus. None where the theme
states none; a connector then draws the hover border, else border.color, where
it shows a focused button by its border (docs/platform-facts.md §2.3).
Fill of a dialog’s default button, the one Enter activates, where the
platform gives it a look of its own: Breeze’s Button mixed a fifth
towards Highlight. None where the default button is the primary
one (macOS, Windows): a connector then draws primary_background and
primary_text_color in every state. Where it is stated, the default
button is this fill, lettered in default_button_text_color (else
font.color) and framed in default_button_border_color (else
border.color): the fill decides (docs/platform-facts.md §2.3).
Breeze tints its default button only in an active window; the
connectors draw this look whatever the window’s state.
Label colour of a dialog’s default button, read only where
default_button_background is stated; None there is font.color,
as Breeze letters it (docs/platform-facts.md §2.3).
Border colour of a dialog’s default button, read only where
default_button_background is stated; None there is border.color
(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.