#[repr(C)]pub struct SystemStyle {
pub theme: Theme,
pub platform: Platform,
pub colors: SystemColors,
pub fonts: SystemFonts,
pub metrics: SystemMetrics,
pub language: AzString,
pub app_specific_stylesheet: Option<Box<Stylesheet>>,
pub icon_style: IconStyleOptions,
pub scrollbar: Option<Box<ComputedScrollbarStyle>>,
}Expand description
A unified collection of discovered system style properties.
Fields§
§theme: Theme§platform: Platform§colors: SystemColors§fonts: SystemFonts§metrics: SystemMetrics§language: AzStringSystem language/locale in BCP 47 format (e.g., “en-US”, “de-DE”) Detected from OS settings at startup
app_specific_stylesheet: Option<Box<Stylesheet>>An optional, user-provided stylesheet loaded from a conventional
location (~/.config/azul/styles/<app_name>.css), allowing for
application-specific “ricing”. This is only loaded when the “io”
feature is enabled and not disabled by the AZUL_DISABLE_RICING env var.
icon_style: IconStyleOptionsIcon-specific styling options (grayscale, tinting, etc.)
scrollbar: Option<Box<ComputedScrollbarStyle>>Scrollbar style information (boxed to ensure stable FFI size)
Implementations§
Source§impl SystemStyle
impl SystemStyle
Sourcepub fn new() -> Self
pub fn new() -> Self
Discovers the system’s UI style, and loads an optional app-specific stylesheet.
If the “io” feature is enabled, this function may be slow as it can involve running external commands and reading files.
If the “io” feature is disabled, this returns a hard-coded, deterministic style based on the target operating system.
Sourcepub fn create_csd_stylesheet(&self) -> Stylesheet
pub fn create_csd_stylesheet(&self) -> Stylesheet
Create a CSS stylesheet for CSD (Client-Side Decorations) titlebar
This generates CSS rules for the CSD titlebar using system colors, fonts, and metrics to match the native platform look.
Trait Implementations§
Source§impl Clone for SystemStyle
impl Clone for SystemStyle
Source§fn clone(&self) -> SystemStyle
fn clone(&self) -> SystemStyle
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more