Use a builtin function to access the dark-style

instead of a property on NativeStyleMetrics
This commit is contained in:
Olivier Goffart 2022-10-18 16:36:33 +02:00 committed by Olivier Goffart
parent b87705aa56
commit 0ba468c236
17 changed files with 86 additions and 184 deletions

View file

@ -30,7 +30,6 @@ struct ItemVTable;
#include "slint_point.h"
#include "slint_backend_internal.h"
#include "slint_qt_internal.h"
#include "slint_selector_internal.h"
/// \rst
/// The :code:`slint` namespace is the primary entry point into the Slint C++ API.
@ -118,6 +117,8 @@ 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_style() const { return slint_windowrc_dark_style(&inner); }
template<typename Component, typename ItemArray>
void unregister_component(Component *c, ItemArray items) const
{