From 9aa0f051ff77748e3c407ab1fb2e840705956be4 Mon Sep 17 00:00:00 2001 From: Sam Gillam Date: Wed, 4 Sep 2024 12:05:07 -0400 Subject: [PATCH] Fix light/dark toggle button on "Palette Test" page --- test/QmlControls/QmlTest.qml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test/QmlControls/QmlTest.qml b/test/QmlControls/QmlTest.qml index cce783afa07..5ba1596afaa 100644 --- a/test/QmlControls/QmlTest.qml +++ b/test/QmlControls/QmlTest.qml @@ -12,6 +12,8 @@ Rectangle { anchors.margins: ScreenTools.defaultFontPixelWidth color: "white" + QGCPalette { id: qgcPal } + property var palette: QGCPalette { colorGroupEnabled: true } property var enabledPalette: QGCPalette { colorGroupEnabled: true } property var disabledPalette: QGCPalette { colorGroupEnabled: false } @@ -237,16 +239,16 @@ Rectangle { anchors.verticalCenter: parent.verticalCenter QGCRadioButton { text: qsTr("Light") - checked: _root.qgcPal.globalTheme === QGCPalette.Light + checked: qgcPal.globalTheme === QGCPalette.Light onClicked: { - _root.qgcPal.globalTheme = QGCPalette.Light + qgcPal.globalTheme = QGCPalette.Light } } QGCRadioButton { text: qsTr("Dark") - checked: _root.qgcPal.globalTheme === QGCPalette.Dark + checked: qgcPal.globalTheme === QGCPalette.Dark onClicked: { - _root.qgcPal.globalTheme = QGCPalette.Dark + qgcPal.globalTheme = QGCPalette.Dark } } }