Commit 42a542a1 authored by Johannes Schwab's avatar Johannes Schwab

client: make some dialogs scrollable

parent cc082651
......@@ -225,7 +225,7 @@ Page {
TextField {
id: filter
Layout.fillWidth: true
Layout.rightMargin: Globals.mobile ? 5 : 0
Layout.leftMargin: Globals.mobile ? 5 : 0
placeholderText: qsTr("Search recipe…")
text: backend.filter
onTextChanged: backend.filter = text
......
......@@ -87,46 +87,55 @@ Page {
title: qsTr("Your sync key")
ColumnLayout {
ScrollView {
anchors.fill: parent
Label {
Layout.maximumWidth: mainWindow.width - 50
Layout.alignment: Qt.AlignHCenter
text: qsTr("Scan the QR Code with your other device:")
wrapMode: Text.Wrap
}
Image {
source: "image://QRCode/" + backend.syncKeyHex
cache: false
Layout.alignment: Qt.AlignHCenter
sourceSize.width: Math.min(mainWindow.width - 50, 300)
sourceSize.height: Math.min(mainWindow.height - 50, 300)
}
Label {
Layout.maximumWidth: mainWindow.width - 50
Layout.alignment: Qt.AlignHCenter
text: qsTr("If scaning the QR Code is not possible, you can also type in the key by hand:")
wrapMode: Text.Wrap
}
TextField {
id: keyText
Layout.maximumWidth: mainWindow.width - 50
Layout.alignment: Qt.AlignHCenter
text: backend.syncKeyHex
font.family: "Monospace"
wrapMode: Text.Wrap
readOnly: true
}
Label {
Layout.maximumWidth: keyText.width
Layout.alignment: Qt.AlignHCenter
text: qsTr("(Your sync key will be available on the server for %1:%2 minutes.)").arg(Math.floor(showSyncKeyDialog.remTime / 60.)).arg(showSyncKeyDialog.remTime % 60)
wrapMode: Text.Wrap
clip: true
Flickable {
boundsBehavior: Flickable.StopAtBounds
ColumnLayout {
anchors.fill: parent
Label {
Layout.maximumWidth: mainWindow.width - 50
Layout.alignment: Qt.AlignHCenter
text: qsTr("Scan the QR Code with your other device:")
wrapMode: Text.Wrap
}
Image {
id: qrcode
source: "image://QRCode/" + backend.syncKeyHex
cache: false
Layout.alignment: Qt.AlignHCenter
sourceSize.width: Math.min(mainWindow.width - 50, 250)
sourceSize.height: Math.min(mainWindow.height - 50, 250)
}
Label {
Layout.maximumWidth: qrcode.width
Layout.alignment: Qt.AlignHCenter
text: qsTr("If scaning the QR Code is not possible, you can also type in the key by hand:")
wrapMode: Text.Wrap
}
TextField {
Layout.maximumWidth: qrcode.width
Layout.alignment: Qt.AlignHCenter
text: backend.syncKeyHex
font.family: "Monospace"
wrapMode: Text.Wrap
readOnly: true
}
Label {
Layout.maximumWidth: qrcode.width
Layout.alignment: Qt.AlignHCenter
text: qsTr("(Your sync key will be available on the server for %1:%2 minutes.)").arg(Math.floor(showSyncKeyDialog.remTime / 60.)).arg(showSyncKeyDialog.remTime % 60)
wrapMode: Text.Wrap
}
}
}
}
......@@ -332,28 +341,37 @@ Page {
title: qsTr("About %1").arg(Qt.application.name)
ColumnLayout {
ScrollView {
anchors.fill: parent
MediumLabel {
Layout.maximumWidth: mainWindow.width - 30
Layout.alignment: Qt.AlignHCenter
text: qsTr("%1 %2").arg(Qt.application.name).arg(Qt.application.version)
wrapMode: Text.Wrap
}
Label {
Layout.maximumWidth: mainWindow.width - 30
Layout.alignment: Qt.AlignHCenter
text: qsTr("Author: Johannes Schwab")
wrapMode: Text.Wrap
}
Label {
Layout.maximumWidth: mainWindow.width - 30
Layout.alignment: Qt.AlignHCenter
text: "This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.\n\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>."
wrapMode: Text.Wrap
clip: true
Flickable {
boundsBehavior: Flickable.StopAtBounds
ColumnLayout {
anchors.fill: parent
MediumLabel {
Layout.maximumWidth: mainWindow.width - 50
Layout.alignment: Qt.AlignHCenter
text: qsTr("%1 %2").arg(Qt.application.name).arg(Qt.application.version)
wrapMode: Text.Wrap
}
Label {
Layout.maximumWidth: mainWindow.width - 50
Layout.alignment: Qt.AlignHCenter
text: qsTr("Author: Johannes Schwab")
wrapMode: Text.Wrap
}
Label {
Layout.maximumWidth: mainWindow.width - 50
Layout.alignment: Qt.AlignHCenter
text: "This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.\n\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>."
wrapMode: Text.Wrap
}
}
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment