HBoxPopup: split text into summary and details

This commit is contained in:
miruka 2019-09-09 06:32:29 -04:00
parent 9286f54cd5
commit 6f7695ad22
3 changed files with 17 additions and 7 deletions

View File

@ -10,8 +10,8 @@ HPopup {
signal cancel()
property alias label: label
property alias text: label.text
property alias summary: summary
property alias details: details
property bool okClicked: false
@ -27,8 +27,18 @@ HPopup {
HLabel {
id: label
id: summary
wrapMode: Text.Wrap
font.bold: true
visible: Boolean(text)
Layout.fillWidth: true
}
HLabel {
id: details
wrapMode: Text.Wrap
visible: Boolean(text)
Layout.fillWidth: true
}

View File

@ -2,8 +2,8 @@ import QtQuick 2.12
import "../Base"
HBoxPopup {
text: qsTr(
"Clear this room's messages?\n" +
summary.text: qsTr("Clear this room's messages?")
details.text: qsTr(
"The messages will only be removed on your side. " +
"They will be available again after you restart the application."
)

View File

@ -62,7 +62,7 @@ HBox {
property url file: ""
id: exportPasswordPopup
label.text: qsTr("Please enter a passphrase to protect this file:")
details.text: qsTr("Please enter a passphrase to protect this file:")
onAcceptedPasswordChanged:
encryptionUI.exportKeys(file, acceptedPassword, exportButton)
}
@ -79,7 +79,7 @@ HBox {
}
id: importPasswordPopup
label.text: qsTr(
details.text: qsTr(
"Please enter the passphrase that was used to protect this file:"
)
onAcceptedPasswordChanged: