qml: move remaining buttons to bottom of dialogs
This commit is contained in:
@@ -25,72 +25,81 @@ ElDialog {
|
||||
color: "#aa000000"
|
||||
}
|
||||
|
||||
Flickable {
|
||||
padding: 0
|
||||
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
contentHeight: rootLayout.height
|
||||
clip:true
|
||||
interactive: height < contentHeight
|
||||
spacing: 0
|
||||
|
||||
ColumnLayout {
|
||||
id: rootLayout
|
||||
width: parent.width
|
||||
spacing: constants.paddingMedium
|
||||
Flickable {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
|
||||
QRImage {
|
||||
id: qr
|
||||
render: dialog.enter ? false : true
|
||||
qrdata: dialog.text_qr ? dialog.text_qr : dialog.text
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
Layout.topMargin: constants.paddingSmall
|
||||
Layout.bottomMargin: constants.paddingSmall
|
||||
}
|
||||
contentHeight: rootLayout.height
|
||||
clip:true
|
||||
interactive: height < contentHeight
|
||||
|
||||
ColumnLayout {
|
||||
id: rootLayout
|
||||
width: parent.width
|
||||
spacing: constants.paddingMedium
|
||||
|
||||
QRImage {
|
||||
id: qr
|
||||
render: dialog.enter ? false : true
|
||||
qrdata: dialog.text_qr ? dialog.text_qr : dialog.text
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
Layout.topMargin: constants.paddingSmall
|
||||
Layout.bottomMargin: constants.paddingSmall
|
||||
}
|
||||
|
||||
TextHighlightPane {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
Layout.fillWidth: true
|
||||
Layout.maximumWidth: qr.width
|
||||
Label {
|
||||
width: parent.width
|
||||
text: dialog.text
|
||||
wrapMode: Text.Wrap
|
||||
font.pixelSize: constants.fontSizeLarge
|
||||
font.family: FixedFont
|
||||
maximumLineCount: 4
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
}
|
||||
|
||||
TextHighlightPane {
|
||||
Layout.fillWidth: true
|
||||
Label {
|
||||
width: parent.width
|
||||
text: dialog.text
|
||||
visible: dialog.text_help
|
||||
text: dialog.text_help
|
||||
wrapMode: Text.Wrap
|
||||
font.pixelSize: constants.fontSizeLarge
|
||||
font.family: FixedFont
|
||||
maximumLineCount: 4
|
||||
elide: Text.ElideRight
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
}
|
||||
|
||||
Label {
|
||||
visible: dialog.text_help
|
||||
text: dialog.text_help
|
||||
wrapMode: Text.Wrap
|
||||
}
|
||||
}
|
||||
|
||||
ButtonContainer {
|
||||
Layout.fillWidth: true
|
||||
|
||||
FlatButton {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
Layout.preferredWidth: 1
|
||||
|
||||
Rectangle {
|
||||
height: 1
|
||||
Layout.preferredWidth: qr.width
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
color: Material.accentColor
|
||||
}
|
||||
|
||||
ButtonContainer {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
|
||||
FlatButton {
|
||||
Layout.minimumWidth: dialog.width * 1/4
|
||||
text: qsTr('Copy')
|
||||
icon.source: '../../icons/copy_bw.png'
|
||||
onClicked: {
|
||||
AppController.textToClipboard(dialog.text)
|
||||
toaster.show(this, qsTr('Copied!'))
|
||||
}
|
||||
text: qsTr('Copy')
|
||||
icon.source: '../../icons/copy_bw.png'
|
||||
onClicked: {
|
||||
AppController.textToClipboard(dialog.text)
|
||||
toaster.show(this, qsTr('Copied!'))
|
||||
}
|
||||
FlatButton {
|
||||
Layout.minimumWidth: dialog.width * 1/4
|
||||
text: qsTr('Share')
|
||||
icon.source: '../../icons/share.png'
|
||||
onClicked: {
|
||||
AppController.doShare(dialog.text, dialog.title)
|
||||
}
|
||||
}
|
||||
FlatButton {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredWidth: 1
|
||||
|
||||
text: qsTr('Share')
|
||||
icon.source: '../../icons/share.png'
|
||||
onClicked: {
|
||||
AppController.doShare(dialog.text, dialog.title)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user