Add ThemeChanged variant to Event in iced_sentinel

This commit is contained in:
Héctor Ramón Jiménez 2024-02-27 15:19:26 +01:00
parent 7f7c5ea337
commit c856d2b513
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
13 changed files with 69 additions and 4 deletions

View file

@ -2,6 +2,7 @@ use crate::application::{self, StyleSheet as _};
use crate::conversion;
use crate::core::mouse;
use crate::core::{Color, Size};
use crate::debug;
use crate::graphics::Viewport;
use crate::Application;
@ -37,6 +38,8 @@ where
let theme = application.theme();
let appearance = theme.appearance(&application.style());
let _ = theme.palette().map(debug::theme_changed);
let viewport = {
let physical_size = window.inner_size();
@ -211,5 +214,7 @@ where
// Update theme and appearance
self.theme = application.theme();
self.appearance = self.theme.appearance(&application.style());
let _ = self.theme.palette().map(debug::theme_changed);
}
}