diff --git a/src/qml/Base/HBoxPopup.qml b/src/qml/Base/HBoxPopup.qml index 5f0154d9..746f995c 100644 --- a/src/qml/Base/HBoxPopup.qml +++ b/src/qml/Base/HBoxPopup.qml @@ -14,11 +14,14 @@ HPopup { property alias details: details property bool okClicked: false + property string okText: qsTr("OK") + property bool okEnabled: true + box.focusButton: "ok" box.clickButtonOnEnter: "ok" box.buttonModel: [ - { name: "ok", text: qsTr("OK"), iconName: "ok" }, + { name: "ok", text: okText, iconName: "ok" , enabled: okEnabled}, { name: "cancel", text: qsTr("Cancel"), iconName: "cancel" }, ] box.buttonCallbacks: ({ diff --git a/src/qml/Base/HPasswordPopup.qml b/src/qml/Base/HPasswordPopup.qml index 1065d7c9..962b4f5d 100644 --- a/src/qml/Base/HPasswordPopup.qml +++ b/src/qml/Base/HPasswordPopup.qml @@ -5,6 +5,7 @@ import "../SidePane" HBoxPopup { id: popup + okEnabled: Boolean(passwordField.text) onAboutToShow: { okClicked = false