diff --git a/client/ui/qml/Pages2/PageSettingsApiSubscriptionKey.qml b/client/ui/qml/Pages2/PageSettingsApiSubscriptionKey.qml index 23f9706ad..2ad818ea5 100644 --- a/client/ui/qml/Pages2/PageSettingsApiSubscriptionKey.qml +++ b/client/ui/qml/Pages2/PageSettingsApiSubscriptionKey.qml @@ -119,8 +119,9 @@ PageType { } Rectangle { - Layout.fillWidth: true - Layout.preferredHeight: width + Layout.preferredWidth: Math.min(Math.min(root.width - (Layout.leftMargin + Layout.rightMargin), root.height * 0.5), 360) + Layout.preferredHeight: Layout.preferredWidth + Layout.alignment: Qt.AlignHCenter Layout.topMargin: 20 Layout.leftMargin: 16 Layout.rightMargin: 16 @@ -132,6 +133,9 @@ PageType { Image { anchors.fill: parent smooth: false + fillMode: Image.PreserveAspectFit + sourceSize.width: parent.width + sourceSize.height: parent.height source: ApiConfigsController.qrCodesCount > 0 && ApiConfigsController.qrCodes[0] ? ApiConfigsController.qrCodes[0] : "" } } diff --git a/client/ui/qml/Pages2/PageShareConnection.qml b/client/ui/qml/Pages2/PageShareConnection.qml index efac6a8de..8e56dac51 100644 --- a/client/ui/qml/Pages2/PageShareConnection.qml +++ b/client/ui/qml/Pages2/PageShareConnection.qml @@ -269,8 +269,9 @@ PageType { Rectangle { id: qrCodeContainer - Layout.fillWidth: true - Layout.preferredHeight: width + Layout.preferredWidth: Math.min(Math.min(listView.width - (Layout.leftMargin + Layout.rightMargin), pageShareConnection.height * 0.5), 360) + Layout.preferredHeight: Layout.preferredWidth + Layout.alignment: Qt.AlignHCenter Layout.topMargin: 20 Layout.leftMargin: 16 Layout.rightMargin: 16 @@ -280,6 +281,9 @@ PageType { Image { anchors.fill: parent smooth: false + fillMode: Image.PreserveAspectFit + sourceSize.width: parent.width + sourceSize.height: parent.height source: pageShareConnection.isSelfHostedConfig ? (isQrCodeVisible ? ExportController.qrCodes[0] : "") : (isQrCodeVisible ? ApiConfigsController.qrCodes[0] : "") property bool isFocusable: true Keys.onTabPressed: FocusController.nextKeyTabItem()