mirror of
https://github.com/outbackdingo/amnezia-client.git
synced 2026-01-27 10:18:14 +00:00
fix: sharing QR code size (#1830)
This commit is contained in:
@@ -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] : ""
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user