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

View File

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

View File

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