pub fn to_theme(variant: &ThemeVariant, name: &str) -> ThemeExpand description
Create an iced iced_core::theme::Theme from a native_theme::ThemeVariant.
Builds a custom theme using Theme::custom_with_fn(), which:
- Maps the 6 Palette fields from native-theme colors via
palette::to_palette() - Generates an Extended palette, then overrides secondary and background.weak
entries via
extended::apply_overrides()
The resulting theme carries the mapped Palette and Extended palette. iced’s built-in Catalog trait implementations for all 8 core widgets (Button, Container, TextInput, Scrollable, Checkbox, Slider, ProgressBar, Tooltip) automatically derive their Style structs from this palette. No explicit Catalog implementations are needed.