Skip to main content

Crate boltz_theme

Crate boltz_theme 

Source
Expand description

§Theme

This crate provides the theme system for the app.

§Overview

A theme is a collection of colors used to build a consistent appearance for UI components across the application.

Structs§

AccentColors
A collection of colors that are used to color indent aware lines in the editor.
ChevronIcons
The icons used for chevrons.
ChevronIconsContent
ColorScale
A scale of colors for a given ColorScaleSet.
ColorScaleSet
Provides groups of ColorScales for light and dark themes, as well as transparent versions of each scale.
ColorScaleStep
A collection of colors that are used to style the UI.
ColorScales
DiagnosticColors
DirectoryIcons
The icons used for directories.
DirectoryIconsContent
FontFamilyCache
A cache for the list of font families.
GlobalTheme
The active theme.
IconDefinition
An icon definition.
IconDefinitionContent
IconTheme
An icon theme.
IconThemeContent
IconThemeFamily
A family of icon themes.
IconThemeFamilyContent
IconThemeNotFoundError
An error indicating that the icon theme with the given name was not found.
PlayerColor
PlayerColors
A collection of colors that are used to color players in the editor.
StatusColors
StatusColorsRefinement
A refinable version of [#ident], see that documentation for details.
SyntaxTheme
SystemAppearance
The appearance of the system.
SystemColors
Theme
A theme is the primary mechanism for defining the appearance of the UI.
ThemeColorFieldIter
An iterator over the variants of ThemeColorField
ThemeColors
ThemeColorsRefinement
A refinable version of [#ident], see that documentation for details.
ThemeFamily
A theme family is a grouping of themes under a single name.
ThemeMeta
The metadata for a theme.
ThemeNotFoundError
An error indicating that the theme with the given name was not found.
ThemeRegistry
The registry for themes.
ThemeStyles
ThemeStylesRefinement
A refinable version of [#ident], see that documentation for details.

Enums§

Appearance
The appearance of the theme.
AppearanceContent
The appearance of a theme in serialized content.
LoadThemes
Which themes should be loaded. This is used primarily for testing.
ThemeColorField
UiDensity
Specifies the density of the UI. Note: This setting is still experimental.

Constants§

CLIENT_SIDE_DECORATION_ROUNDING
Defines window border radius for platforms that use client side decorations.
CLIENT_SIDE_DECORATION_SHADOW
Defines window shadow size for platforms that use client side decorations.
DEFAULT_DARK_THEME
The name of the default dark theme.
DEFAULT_ICON_THEME_NAME
The name of the default icon theme.

Traits§

ActiveTheme
Implementing this trait allows accessing the active theme.
ThemeSettingsProvider
Trait for providing theme-related settings (fonts, font sizes, UI density) without coupling to the concrete settings infrastructure.

Functions§

all_theme_colors
apply_status_color_defaults
Applies default status color backgrounds from their foreground counterparts.
apply_theme_color_defaults
Applies default theme color values derived from player colors.
default_color_scales
Color scales used to build the default themes.
default_icon_theme
Returns the default icon theme.
deserialize_icon_theme
Deserializes an icon theme from the given bytes.
init
Initialize the theme system with default themes.
set_appearance
Switches the active appearance (light/dark), swapping in the matching built-in theme so cx.theme().colors() reflects the new mode. Components that read neutrals via the theme re-style automatically.
set_theme_settings_provider
Registers the global ThemeSettingsProvider implementation.
theme_settings
Returns the global ThemeSettingsProvider.
try_parse_color
Parses a color string into an Hsla value.