Skip to main content

apply_theme_signal_to_root_classes

Function apply_theme_signal_to_root_classes 

Source
pub fn apply_theme_signal_to_root_classes(
    store: Option<Res<'_, PropertyStore>>,
    roots: Query<'_, '_, &mut LumenClasses, Without<ChildOf>>,
)
Expand description

Consumer half of the W1.6 theme-notify path: reads PropertyStore::dirty_peek for PropertyKey::Global("__theme__") and applies theme-light / theme-dark to every root entity’s crate::components::LumenClasses.

Uses dirty_peek (non-destructive) so the wave-1 crate::render_world::roll_up_frame_dirty can also observe the same notify entry on this tick. Skips the iteration entirely when the queue carries no theme write - no Changed<LumenClasses> bump on quiet ticks.