Loading the theme gallery…

Pick a theme in the ComboBox — all 12 (Fluent, Material, Nord, Dracula, Catppuccin, Solarized, Gruvbox, Tokyo Night) are ResourceDictionary palettes from the official specs, and the swap re-colors the live UI through {DynamicResource} without rebuilding it.

How it's built

From examples/theme_gallery.rs and the built-in dictionaries in assets/themes/.

1. Apply a built-in theme

One call merges the dictionary into application resources; every DynamicResource re-resolves live.

bevy_pf::themes::apply_theme(world, "catppuccin-mocha")?;
2. What a theme is

Each of the 12 themes defines the same Pf.* brush keys plus implicit styles that reference them.

<SolidColorBrush x:Key="Pf.ControlBackground" Color="#45475A"/>
<SolidColorBrush x:Key="Pf.AccentBrush" Color="#CBA6F7"/>
<Style TargetType="Button">
  <Setter Property="Background" Value="{DynamicResource Pf.ControlBackground}"/>
  <Style.Triggers>
    <Trigger Property="IsMouseOver" Value="True">
      <Setter Property="Background" Value="{DynamicResource Pf.ControlHoverBackground}"/>
    </Trigger>
  </Style.Triggers>
</Style>
3. The live switcher

A system watches the ComboBox selection and swaps themes without rebuilding the UI.

fn switch_theme(combos: Query<&PfComboBox, Changed<PfComboBox>>, mut commands: Commands) {
    let Some(index) = combos.iter().next().and_then(|c| c.selected) else { return };
    let theme = THEMES[index];
    commands.queue(move |world: &mut World| {
        apply_theme(world, theme.slug).ok();   // existing widgets re-color in place
    });
}