Add apply button to device renaming field
This commit is contained in:
parent
51327d810b
commit
ee5675bc9b
|
@ -69,7 +69,7 @@ HTile {
|
||||||
|
|
||||||
contextMenu: HMenu {
|
contextMenu: HMenu {
|
||||||
id: actionMenu
|
id: actionMenu
|
||||||
implicitWidth: Math.min(320 * theme.uiScale, window.width)
|
implicitWidth: Math.min(360 * theme.uiScale, window.width)
|
||||||
onOpened: nameField.forceActiveFocus()
|
onOpened: nameField.forceActiveFocus()
|
||||||
|
|
||||||
HLabeledItem {
|
HLabeledItem {
|
||||||
|
@ -78,12 +78,25 @@ HTile {
|
||||||
label.text: qsTr("Public display name:")
|
label.text: qsTr("Public display name:")
|
||||||
label.horizontalAlignment: Qt.AlignHCenter
|
label.horizontalAlignment: Qt.AlignHCenter
|
||||||
|
|
||||||
|
HRowLayout {
|
||||||
|
width: parent.width
|
||||||
|
|
||||||
HTextField {
|
HTextField {
|
||||||
id: nameField
|
id: nameField
|
||||||
width: parent.width
|
|
||||||
defaultText: model.display_name
|
defaultText: model.display_name
|
||||||
horizontalAlignment: Qt.AlignHCenter
|
horizontalAlignment: Qt.AlignHCenter
|
||||||
onAccepted: renameDeviceRequest(text)
|
onAccepted: renameDeviceRequest(text)
|
||||||
|
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
|
||||||
|
HButton {
|
||||||
|
icon.name: "apply"
|
||||||
|
icon.color: theme.colors.positiveBackground
|
||||||
|
onClicked: renameDeviceRequest(nameField.text)
|
||||||
|
|
||||||
|
Layout.fillHeight: true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user