Skip to main content

Module theme_loader

Module theme_loader 

Source
Expand description

Theme file discovery and loading for dampen-dev.

This module provides functions for discovering theme.dampen files and loading them into ThemeContext for runtime use.

Note: System theme detection is handled by Iced’s built-in system::theme_changes() subscription, which uses winit’s native theme detection. The initial theme is determined by the theme document’s default_theme setting, and then updated reactively when the system theme changes.

Enums§

ThemeLoadError
Errors that can occur when loading themes

Functions§

create_minimal_dampen_app
Create a minimal Dampen application structure for testing.
discover_theme_file
Discover theme.dampen file in a project directory.
find_project_root
Find the project root by searching for theme.dampen in multiple locations.
find_theme_file_path
Find the path to theme.dampen in a project directory.
load_theme_context
Discover and load theme.dampen from a project directory.
load_theme_context_with_preference
Discover and load theme.dampen with an optional system preference.