Skip to main content

Crate native_theme

Crate native_theme 

Source
Expand description

§native-theme

Cross-platform native theme detection and loading for Rust GUI applications.

Any Rust GUI app can look native on any platform by loading a single theme file or reading live OS settings, without coupling to any specific toolkit.

Re-exports§

pub use icons::IconSetChoice;
pub use icons::default_icon_choice;
pub use icons::list_freedesktop_themes;
pub use pipeline::DiagnosticEntry;
pub use pipeline::PlatformPreset;
pub use resolve::ResolutionContext;

Modules§

color
Color types and sRGB utilities.
detect
OS detection: dark mode, reduced motion, DPI, desktop environment. OS detection: dark mode, reduced motion, DPI, desktop environment.
error
Error types for theme operations.
freedesktop
Freedesktop icon theme lookup (Linux).
gnome
GNOME portal theme reader. GNOME portal reader: reads accent color, color scheme, contrast, fonts, text scale, accessibility flags, and icon_set from the XDG Desktop Portal Settings interface (via ashpd) and gsettings.
icons
Icon loading and dispatch. Icon loading and dispatch.
kde
KDE theme reader.
model
Theme data model types.
pipeline
Theme pipeline: reader -> preset merge -> resolve -> validate. Theme pipeline: reader -> preset merge -> resolve -> validate.
prelude
Convenience re-exports for common usage.
presets
Bundled theme presets. Bundled theme presets and TOML serialization API.
rasterize
SVG-to-RGBA rasterization utilities.
resolve
Theme resolution engine (inheritance + validation).
theme
Theme data model: types, defaults, fonts, borders, widgets.
watch
Runtime theme change watching. Runtime theme change watching.

Structs§

AccessibilityPreferences
OS-detected accessibility preferences.
SystemTheme
Result of the OS-first pipeline. Holds both resolved variants.

Type Aliases§

Result
Convenience Result type alias for this crate.