mirror of
https://github.com/monero-project/monero-gui
synced 2025-01-23 10:57:28 +01:00
Merge pull request #2428
5fe6b48
Settings: fix 'Light theme' checkbox (xiphon)
This commit is contained in:
commit
f948d0e214
@ -40,6 +40,7 @@ Item {
|
|||||||
property string uncheckedIcon
|
property string uncheckedIcon
|
||||||
property int imgWidth: 13
|
property int imgWidth: 13
|
||||||
property int imgHeight: 13
|
property int imgHeight: 13
|
||||||
|
property bool toggleOnClick: true
|
||||||
property bool checked: false
|
property bool checked: false
|
||||||
property alias background: backgroundRect.color
|
property alias background: backgroundRect.color
|
||||||
property bool border: true
|
property bool border: true
|
||||||
@ -51,7 +52,9 @@ Item {
|
|||||||
width: checkBoxLayout.width
|
width: checkBoxLayout.width
|
||||||
|
|
||||||
function toggle(){
|
function toggle(){
|
||||||
checkBox.checked = !checkBox.checked
|
if (checkBox.toggleOnClick) {
|
||||||
|
checkBox.checked = !checkBox.checked
|
||||||
|
}
|
||||||
checkBox.clicked()
|
checkBox.clicked()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,6 +72,7 @@ Rectangle {
|
|||||||
id: themeCheckbox
|
id: themeCheckbox
|
||||||
checked: !MoneroComponents.Style.blackTheme
|
checked: !MoneroComponents.Style.blackTheme
|
||||||
text: qsTr("Light theme") + translationManager.emptyString
|
text: qsTr("Light theme") + translationManager.emptyString
|
||||||
|
toggleOnClick: false
|
||||||
onClicked: {
|
onClicked: {
|
||||||
MoneroComponents.Style.blackTheme = !MoneroComponents.Style.blackTheme;
|
MoneroComponents.Style.blackTheme = !MoneroComponents.Style.blackTheme;
|
||||||
persistentSettings.blackTheme = MoneroComponents.Style.blackTheme;
|
persistentSettings.blackTheme = MoneroComponents.Style.blackTheme;
|
||||||
|
Loading…
Reference in New Issue
Block a user