Refactor HButton
This commit is contained in:
@@ -31,7 +31,7 @@ HColumnLayout {
|
||||
}
|
||||
|
||||
HRowLayout {
|
||||
HUIButton {
|
||||
HButton {
|
||||
id: exportButton
|
||||
iconName: "export-keys"
|
||||
text: qsTr("Export")
|
||||
@@ -41,7 +41,7 @@ HColumnLayout {
|
||||
Layout.alignment: Qt.AlignBottom
|
||||
}
|
||||
|
||||
HUIButton {
|
||||
HButton {
|
||||
id: importButton
|
||||
iconName: "import-keys"
|
||||
text: qsTr("Import")
|
||||
|
@@ -173,7 +173,7 @@ HGridLayout {
|
||||
HRowLayout {
|
||||
Layout.alignment: Qt.AlignBottom
|
||||
|
||||
HUIButton {
|
||||
HButton {
|
||||
property bool nameChangeRunning: false
|
||||
property bool avatarChangeRunning: false
|
||||
|
||||
@@ -183,22 +183,20 @@ HGridLayout {
|
||||
loading: nameChangeRunning || avatarChangeRunning
|
||||
enabled:
|
||||
nameField.changed || aliasField.changed || avatar.changed
|
||||
onClicked: applyChanges()
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.alignment: Qt.AlignBottom
|
||||
|
||||
onClicked: applyChanges()
|
||||
}
|
||||
|
||||
HUIButton {
|
||||
HButton {
|
||||
iconName: "cancel"
|
||||
text: qsTr("Cancel")
|
||||
enabled: saveButton.enabled && ! saveButton.loading
|
||||
onClicked: cancelChanges()
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.alignment: Qt.AlignBottom
|
||||
|
||||
onClicked: cancelChanges()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -62,13 +62,12 @@ HPage {
|
||||
Repeater {
|
||||
model: ["username", "email", "phone"]
|
||||
|
||||
HUIButton {
|
||||
HButton {
|
||||
iconName: modelData
|
||||
circle: true
|
||||
checked: loginWith == modelData
|
||||
enabled: modelData == "username"
|
||||
autoExclusive: true
|
||||
checkedLightens: true
|
||||
onClicked: loginWith = modelData
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user