pub struct ToolbarTheme {
pub background_color: Option<Rgba>,
pub bar_height: Option<f32>,
pub item_gap: Option<f32>,
pub icon_size: Option<f32>,
pub button_hover_background: Option<Rgba>,
pub button_hover_border_color: Option<Rgba>,
pub button_active_background: Option<Rgba>,
pub button_checked_background: Option<Rgba>,
pub button_checked_border_color: Option<Rgba>,
pub font: Option<FontSpec>,
pub border: Option<WidgetBorderSpec>,
}Expand description
Toolbar sizing, spacing, font, and its buttons’ states.
The five button_* fields are the platform’s toolbar-button look. A
platform may give that look to some of a toolbar’s buttons only (GNOME to
image, image-text and arrow buttons; a button with a text label alone keeps
the ordinary button’s look, libadwaita 1.10.0 _toolbars.scss:2-8); an
application applies the connector’s toolbar-button style to those buttons,
and the ordinary button’s style to the others.
Fields§
§background_color: Option<Rgba>Toolbar background color, also a menu bar’s fill: Breeze fills the menu bar and the toolbars as one tools area (docs/platform-facts.md §2.13).
bar_height: Option<f32>Toolbar height in logical pixels. None where the platform states
no toolbar height: KDE’s toolbar sizes to its content, and GNOME’s
.toolbar sets no minimum height (docs/platform-facts.md §2.13).
item_gap: Option<f32>Horizontal space between toolbar items. None where the theme cites
no source for one (docs/platform-facts.md §2.13 states it for every
platform, but a colour scheme has none).
icon_size: Option<f32>Toolbar icon size in logical pixels.
Fill of a toolbar button under the pointer, painted over the toolbar:
a translucent colour is a layer, a transparent one paints nothing.
None where the theme states none: a connector draws the hover as it
draws a flat button’s (docs/platform-facts.md §2.13).
Outline of a toolbar button under the pointer, and while it is pressed.
None where the theme states none: a connector draws the outline as it
draws a flat button’s (docs/platform-facts.md §2.13).
Fill of a toolbar button while it is pressed, painted over the toolbar.
None where the theme states none: a connector draws it as it draws a
pressed flat button (docs/platform-facts.md §2.13).
Fill of a toolbar button that is checked (a toggle that is on), painted
over the toolbar. None where the theme states none: a connector draws
it as it draws a selected flat button (docs/platform-facts.md §2.13).
Outline of a checked toolbar button, drawn at
button.border.line_width: Breeze’s ordinary button pen, Button
mixed frameContrast towards ButtonText; under the pointer and
pressed button_hover_border_color applies. None where the theme
states none: a connector draws it as it draws a selected flat button’s
(docs/platform-facts.md §2.13).
font: Option<FontSpec>Toolbar label font specification.
border: Option<WidgetBorderSpec>Toolbar border specification.
Implementations§
Source§impl ToolbarTheme
impl ToolbarTheme
Sourcepub const FIELD_NAMES: &[&str]
pub const FIELD_NAMES: &[&str]
All serialized field names for this widget theme, for TOML linting.