Add an in-out boolean color-scheme property to Palette (#4701)

This allows applications to force dark/light mode, as well as determine
which mode is active.
This commit is contained in:
Simon Hausmann 2024-03-26 15:44:22 +01:00 committed by GitHub
parent ccc92e6143
commit 68083243b2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
48 changed files with 234 additions and 139 deletions

View file

@ -74,7 +74,10 @@ public:
float scale_factor() const { return slint_windowrc_get_scale_factor(&inner); }
void set_scale_factor(float value) const { slint_windowrc_set_scale_factor(&inner, value); }
bool dark_color_scheme() const { return slint_windowrc_dark_color_scheme(&inner); }
cbindgen_private::ColorScheme color_scheme() const
{
return slint_windowrc_color_scheme(&inner);
}
bool text_input_focused() const { return slint_windowrc_get_text_input_focused(&inner); }
void set_text_input_focused(bool value) const