Skip to content

Commit

Permalink
Fix light/dark toggle button on "Palette Test" page
Browse files Browse the repository at this point in the history
  • Loading branch information
gillamkid authored and HTRamsey committed Sep 4, 2024
1 parent 0365064 commit 9aa0f05
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions test/QmlControls/QmlTest.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down Expand Up @@ -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
}
}
}
Expand Down

0 comments on commit 9aa0f05

Please sign in to comment.