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 color::ParseColorError;pub use color::Rgba;pub use error::Error;pub use error::ThemeResolutionError;pub use model::AnimatedIcon;pub use model::ButtonTheme;pub use model::CardTheme;pub use model::CheckboxTheme;pub use model::ComboBoxTheme;pub use model::DialogButtonOrder;pub use model::DialogTheme;pub use model::ExpanderTheme;pub use model::FontSpec;pub use model::IconData;pub use model::IconProvider;pub use model::IconRole;pub use model::IconSet;pub use model::IconSizes;pub use model::InputTheme;pub use model::LinkTheme;pub use model::ListTheme;pub use model::MenuTheme;pub use model::PopoverTheme;pub use model::ProgressBarTheme;pub use model::ResolvedFontSpec;pub use model::ResolvedIconSizes;pub use model::ResolvedTextScale;pub use model::ResolvedTextScaleEntry;pub use model::ResolvedThemeDefaults;pub use model::ResolvedThemeSpacing;pub use model::ResolvedThemeVariant;pub use model::ScrollbarTheme;pub use model::SegmentedControlTheme;pub use model::SeparatorTheme;pub use model::SidebarTheme;pub use model::SliderTheme;pub use model::SpinnerTheme;pub use model::SplitterTheme;pub use model::StatusBarTheme;pub use model::SwitchTheme;pub use model::TabTheme;pub use model::TextScale;pub use model::TextScaleEntry;pub use model::ThemeDefaults;pub use model::ThemeSpacing;pub use model::ThemeSpec;pub use model::ThemeVariant;pub use model::ToolbarTheme;pub use model::TooltipTheme;pub use model::TransformAnimation;pub use model::WindowTheme;pub use model::bundled_icon_by_name;pub use model::bundled_icon_svg;pub use model::icons::detect_icon_theme;pub use model::icons::icon_name;pub use model::icons::system_icon_set;pub use model::icons::system_icon_theme;
Modules§
- color
- Color types and sRGB utilities.
- error
- Error types for theme operations.
- model
- Theme data model types.
- presets
- Bundled theme presets. Bundled theme presets and TOML serialization API.
Structs§
- System
Theme - Result of the OS-first pipeline. Holds both resolved variants.
Enums§
- Linux
Desktop - Desktop environments recognized on Linux.
Functions§
- detect_
is_ dark - Detect whether the system is using a dark color scheme without caching.
- detect_
linux_ de - Parse
XDG_CURRENT_DESKTOP(a colon-separated list) and return the recognized desktop environment. - detect_
reduced_ motion - Detect whether the user prefers reduced motion without caching.
- diagnose_
platform_ support - Check whether OS theme detection is available on this platform.
- is_
freedesktop_ theme_ available - Check whether a freedesktop icon theme is installed on this system.
- load_
custom_ icon - Load an icon from any
IconProvider, dispatching through the standard platform loading chain. - load_
icon - Load an icon for the given role using the specified icon set.
- load_
icon_ from_ theme - Load an icon using a specific freedesktop icon theme instead of the system default.
- load_
system_ icon_ by_ name - Load a system icon by its platform-specific name string.
- loading_
indicator - Return the loading/spinner animation for the given icon set.
- platform_
preset_ name - Map the current platform to its matching live preset name.
- prefers_
reduced_ motion - Query whether the user prefers reduced motion.
- system_
is_ dark - Detect whether the system is using a dark color scheme.
Type Aliases§
- Result
- Convenience Result type alias for this crate.