diff options
author | MohammadHossein Qanbari <[email protected]> | 2025-03-26 13:51:11 +0100 |
---|---|---|
committer | MohammadHossein Qanbari <[email protected]> | 2025-04-05 02:14:36 +0200 |
commit | 52141b34ecd16b33e9879fc1047c6f9c3dfde6da (patch) | |
tree | 29cb4d7085e7979ea82ecc7b73c675c397f9a864 /examples | |
parent | 0e92a8e0683e2d388a61aac85509a8efbc16cd01 (diff) |
Basic Style: Add support for dark mode color scheme
Previously, the basic style did not respect the system's dark mode
settings because the palette initialized by QQuickBasicTheme lacked
definitions for dark mode colors.
This commit updates the palette initialization to dynamically set colors
based on the current system color scheme. Additionally, the palette is
reinitialized whenever the system color scheme changes.
The controls gallery example has been updated to demonstrate the new
functionality.
[ChangeLog][Controls][Basic] Basic style supports dark mode now.
Fixes: QTBUG-135207
Change-Id: I2d6a74b407a7981905a9b86e97004cf0609a4bf0
Reviewed-by: Mitch Curtis <[email protected]>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/quickcontrols/gallery/gallery.qml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/quickcontrols/gallery/gallery.qml b/examples/quickcontrols/gallery/gallery.qml index c352c2c8e0..b287e1c69c 100644 --- a/examples/quickcontrols/gallery/gallery.qml +++ b/examples/quickcontrols/gallery/gallery.qml @@ -279,7 +279,7 @@ ApplicationWindow { id: colorSchemes // Some Qt Quick styles prioritize the respective design system guidelines // over the system palette. - enabled: ["FluentWinUI3", "Fusion", "iOS"].includes(styleBox.currentText) + enabled: ["FluentWinUI3", "Fusion", "iOS", "Basic"].includes(styleBox.currentText) CheckBox { id: autoColorScheme checked: true |