Merchant: display size warning when height < minHeight

This commit is contained in:
rating89us 2020-05-11 00:42:45 +02:00 committed by GitHub
parent afe1ae9b9c
commit d662e46146
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -25,6 +25,7 @@ Item {
anchors.margins: 0 anchors.margins: 0
property int minWidth: 900 property int minWidth: 900
property int minHeight: 600
property int qrCodeSize: 220 property int qrCodeSize: 220
property bool enableTracking: false property bool enableTracking: false
property string trackingError: "" // setting this will show a message @ tracking table property string trackingError: "" // setting this will show a message @ tracking table
@ -70,7 +71,7 @@ Item {
ColumnLayout { ColumnLayout {
id: mainLayout id: mainLayout
visible: parent.width >= root.minWidth visible: parent.width >= root.minWidth && appWindow.height >= root.minHeight
spacing: 0 spacing: 0
// emulates max-width + center for container // emulates max-width + center for container
@ -556,7 +557,7 @@ Item {
Rectangle { Rectangle {
// Shows when the window is too small // Shows when the window is too small
visible: parent.width < root.minWidth visible: parent.width < root.minWidth || appWindow.height < root.minHeight
anchors.top: parent.top anchors.top: parent.top
anchors.topMargin: 100; anchors.topMargin: 100;
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter