Skip to content

Commit

Permalink
send theme updates (#476)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrmoulton committed May 30, 2024
1 parent 20cbfdb commit b741cd4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/window_handle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ impl WindowHandle {
last_pointer_down: None,
};
window_handle.app_state.set_root_size(size.get_untracked());
if let Some(theme) = theme.get_untracked() {
window_handle.event(Event::ThemeChanged(theme));
}
window_handle
}

Expand Down Expand Up @@ -336,6 +339,7 @@ impl WindowHandle {

pub(crate) fn os_theme_changed(&mut self, theme: floem_winit::window::Theme) {
self.os_theme.set(Some(theme));
self.event(Event::ThemeChanged(theme));
}

pub(crate) fn size(&mut self, size: Size) {
Expand Down

0 comments on commit b741cd4

Please sign in to comment.