mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 14:21: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
|
@ -14,6 +14,7 @@ LICENSE END */
|
|||
|
||||
pub type FieldOffset<T, U> = const_field_offset::FieldOffset<T, U, const_field_offset::AllowPin>;
|
||||
use crate::items::PropertyAnimation;
|
||||
use alloc::rc::Rc;
|
||||
use core::convert::{TryFrom, TryInto};
|
||||
use core::pin::Pin;
|
||||
|
||||
|
@ -332,3 +333,8 @@ pub trait BuiltinItem: Sized {
|
|||
fn fields<Value: ValueType>() -> Vec<(&'static str, &'static dyn FieldInfo<Self, Value>)>;
|
||||
fn callbacks<Value: ValueType>() -> Vec<(&'static str, &'static dyn CallbackInfo<Self, Value>)>;
|
||||
}
|
||||
|
||||
/// Trait implemented by builtin globals
|
||||
pub trait BuiltinGlobal: BuiltinItem {
|
||||
fn new() -> Pin<Rc<Self>>;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue