Skip to main content

Module theme

Module theme 

Source
Expand description

Theme data model: types, defaults, fonts, borders, widgets.

Core types: Theme, ThemeMode, ResolvedTheme, ResolvedDefaults.

Re-exports§

pub use crate::presets::PresetInfo;

Structs§

ButtonTheme
Push button: colors, sizing, spacing, geometry.
CardTheme
Card / container colors and geometry.
CheckboxTheme
Checkbox and radio button theme: colors, indicator, label font, border, and interactive states.
ComboBoxTheme
ComboBox / dropdown trigger sizing.
DefaultsBorderSpec
Defaults-level border specification: color, geometry, and the platform’s line opacity.
DialogTheme
Dialog sizing, spacing, button order, fonts, border, and background.
ExpanderTheme
Expander / disclosure row geometry.
FontSpec
Font specification: family name, size, weight, style, and color.
IconSizes
Per-context icon sizes in logical pixels.
InputTheme
Single-line and multi-line text input fields: everything of a multi-line field but its padding, which is TextAreaTheme’s.
LayoutTheme
Layout spacing constants shared between light and dark variants.
LinkTheme
Hyperlink colors and underline setting.
ListTheme
List and table colors and row geometry.
MenuTheme
Popup and context menu appearance.
PopoverTheme
Popover / dropdown panel appearance.
ProgressBarTheme
Progress bar colors and geometry.
Resolved
A theme fully resolved for a specific color mode.
ResolvedButtonTheme
Push button: colors, sizing, spacing, geometry.
ResolvedCardTheme
Card / container colors and geometry.
ResolvedCheckboxTheme
Checkbox and radio button theme: colors, indicator, label font, border, and interactive states.
ResolvedComboBoxTheme
ComboBox / dropdown trigger sizing.
ResolvedDefaults
Fully resolved global theme defaults where every field is guaranteed populated.
ResolvedDefaultsBorder
The resolved defaults.border: the global border geometry and colour that widget borders inherit.
ResolvedDialogTheme
Dialog sizing, spacing, button order, fonts, border, and background.
ResolvedExpanderTheme
Expander / disclosure row geometry.
ResolvedFontSpec
A resolved (non-optional) font specification produced after theme resolution.
ResolvedIconSizes
Fully resolved per-context icon sizes where every context is guaranteed populated.
ResolvedInputTheme
Single-line and multi-line text input fields: everything of a multi-line field but its padding, which is TextAreaTheme’s.
ResolvedLayoutTheme
Layout spacing constants shared between light and dark variants.
ResolvedLinkTheme
Hyperlink colors and underline setting.
ResolvedListTheme
List and table colors and row geometry.
ResolvedMenuTheme
Popup and context menu appearance.
ResolvedPadding
A widget’s resolved padding, one field per side.
ResolvedPopoverTheme
Popover / dropdown panel appearance.
ResolvedProgressBarTheme
Progress bar colors and geometry.
ResolvedScrollbarTheme
Scrollbar colors and geometry.
ResolvedSegmentedControlTheme
Segmented control sizing (macOS-primary; KDE uses tab bar metrics as proxy).
ResolvedSeparatorTheme
Separator line color and width.
ResolvedSidebarTheme
Sidebar panel background, selection, and hover colors.
ResolvedSliderTheme
Slider control colors and geometry.
ResolvedSpinnerTheme
Spinner / indeterminate progress indicator.
ResolvedSplitterTheme
Splitter handle width and color.
ResolvedStatusBarTheme
Status bar font and background.
ResolvedSwitchTheme
Toggle switch track, thumb, geometry, and interactive states.
ResolvedTabTheme
Tab bar colors and sizing.
ResolvedTextAreaTheme
Multi-line text field: the padding in which it differs from the single-line field. Everything else a text area shows – its fill, text, placeholder, caret, selection, states and font – is InputTheme’s.
ResolvedTextScale
A fully resolved text scale with all four typographic roles populated.
ResolvedTextScaleEntry
A single resolved text scale entry with guaranteed size, weight, and line height.
ResolvedTheme
A fully resolved theme where every field is guaranteed populated.
ResolvedToolbarTheme
Toolbar sizing, spacing, and font.
ResolvedTooltipTheme
Tooltip popup appearance.
ResolvedWidgetBorder
A widget’s resolved border: its colour, geometry and padding.
ResolvedWindowTheme
Window chrome: background, title bar colors, inactive states, geometry.
ScrollbarTheme
Scrollbar colors and geometry.
SegmentedControlTheme
Segmented control sizing (macOS-primary; KDE uses tab bar metrics as proxy).
SeparatorTheme
Separator line color and width.
SidebarTheme
Sidebar panel background, selection, and hover colors.
SliderTheme
Slider control colors and geometry.
SpinnerTheme
Spinner / indeterminate progress indicator.
SplitterTheme
Splitter handle width and color.
StatusBarTheme
Status bar font and background.
SwitchTheme
Toggle switch track, thumb, geometry, and interactive states.
TabTheme
Tab bar colors and sizing.
TextAreaTheme
Multi-line text field: the padding in which it differs from the single-line field. Everything else a text area shows – its fill, text, placeholder, caret, selection, states and font – is InputTheme’s.
TextScale
A named text scale with four typographic roles.
TextScaleEntry
A single entry in a text scale: size, weight, and line height.
Theme
A complete native theme with a name and optional light/dark variants.
ThemeDefaults
Global theme defaults shared across all widgets.
ThemeMode
A single light or dark theme variant containing all visual properties.
ToolbarTheme
Toolbar sizing, spacing, and font.
TooltipTheme
Tooltip popup appearance.
WidgetBorderSpec
Widget-level border specification: color, geometry, and padding.
WindowTheme
Window chrome: background, title bar colors, inactive states, geometry.

Enums§

ArrowSide
Which end of an expander’s header row its disclosure arrow sits at.
ColorMode
Light or dark color mode preference.
DialogButtonOrder
Specifies the order of primary/cancel buttons in dialogs.
DialogEntranceStyle
How a dialog moves onto the screen as it opens.
FontSize
A font size with an explicit unit.
FontStyle
Font style: upright, italic, or oblique.
IconSet
Known icon sets that provide platform-specific icon identifiers.
TabIndicatorSide
Which edge of the active tab its indicator line lies along, for tabs above their pages.

Functions§

intern_font_family
Intern a font family name, returning a deduplicated Arc<str>.