mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 06:11:16 +00:00
Native style: respond to the StyleChange event
So that color scheme is updated when switching to the dark style, for example Fixes #687
This commit is contained in:
parent
a5ea6dd087
commit
e4bd6bbfb8
8 changed files with 180 additions and 104 deletions
|
@ -382,10 +382,10 @@ fn gen_backend_qt(root_dir: &Path, include_dir: &Path) -> anyhow::Result<()> {
|
|||
|
||||
config.export.include = items.iter().map(|x| x.to_string()).collect();
|
||||
|
||||
config
|
||||
.export
|
||||
.body
|
||||
.insert("NativeStyleMetrics".to_owned(), " inline NativeStyleMetrics();".to_owned());
|
||||
config.export.body.insert(
|
||||
"NativeStyleMetrics".to_owned(),
|
||||
" inline NativeStyleMetrics(); inline ~NativeStyleMetrics();".to_owned(),
|
||||
);
|
||||
|
||||
let mut crate_dir = root_dir.to_owned();
|
||||
crate_dir.extend(["sixtyfps_runtime", "rendering_backends", "qt"].iter());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue