diff --git a/resources/qml/device-verification/AwaitingVerificationConfirmation.qml b/resources/qml/device-verification/AwaitingVerificationConfirmation.qml deleted file mode 100644 index 5062a5dd..00000000 --- a/resources/qml/device-verification/AwaitingVerificationConfirmation.qml +++ /dev/null @@ -1,53 +0,0 @@ -// SPDX-FileCopyrightText: 2021 Nheko Contributors -// SPDX-FileCopyrightText: 2022 Nheko Contributors -// -// SPDX-License-Identifier: GPL-3.0-or-later - -import "../ui" -import QtQuick 2.3 -import QtQuick.Controls 2.3 -import QtQuick.Layouts 1.10 -import im.nheko 1.0 - -Pane { - property string title: qsTr("Awaiting Confirmation") - - ColumnLayout { - spacing: 16 - - Label { - id: content - - Layout.maximumWidth: 400 - Layout.fillHeight: true - Layout.fillWidth: true - wrapMode: Text.Wrap - text: qsTr("Waiting for other side to complete verification.") - color: Nheko.colors.text - verticalAlignment: Text.AlignVCenter - } - - Spinner { - Layout.alignment: Qt.AlignHCenter - foreground: Nheko.colors.mid - } - - RowLayout { - Button { - Layout.alignment: Qt.AlignLeft - text: qsTr("Cancel") - onClicked: { - flow.cancel(); - dialog.close(); - } - } - - Item { - Layout.fillWidth: true - } - - } - - } - -} diff --git a/resources/qml/device-verification/DeviceVerification.qml b/resources/qml/device-verification/DeviceVerification.qml index eea1756f..c00a0bdb 100644 --- a/resources/qml/device-verification/DeviceVerification.qml +++ b/resources/qml/device-verification/DeviceVerification.qml @@ -14,10 +14,11 @@ ApplicationWindow { property var flow onClosing: VerificationManager.removeVerificationFlow(flow) - title: stack.currentItem.title + title: stack.currentItem.title_ modality: Qt.NonModal palette: Nheko.colors - height: stack.implicitHeight + color: Nheko.colors.window + minimumHeight: stack.implicitHeight width: stack.implicitWidth flags: Qt.Dialog | Qt.WindowCloseButtonHint | Qt.WindowTitleHint Component.onCompleted: Nheko.reparent(dialog) @@ -25,6 +26,7 @@ ApplicationWindow { StackView { id: stack + anchors.fill: parent initialItem: newVerificationRequest implicitWidth: currentItem.implicitWidth implicitHeight: currentItem.implicitHeight diff --git a/resources/qml/device-verification/DigitVerification.qml b/resources/qml/device-verification/DigitVerification.qml index 5a2d416e..3a8b0df5 100644 --- a/resources/qml/device-verification/DigitVerification.qml +++ b/resources/qml/device-verification/DigitVerification.qml @@ -10,13 +10,16 @@ import im.nheko 1.0 Pane { property string title: qsTr("Verification Code") + background: Rectangle { + color: Nheko.colors.window + } ColumnLayout { + anchors.fill: parent spacing: 16 Label { - Layout.maximumWidth: 400 - Layout.fillHeight: true + Layout.preferredWidth: 400 Layout.fillWidth: true wrapMode: Text.Wrap text: qsTr("Please verify the following digits. You should see the same numbers on both sides. If they differ, please press 'They do not match!' to abort verification!") @@ -24,6 +27,7 @@ Pane { verticalAlignment: Text.AlignVCenter } + Item { Layout.fillHeight: true; } RowLayout { Layout.alignment: Qt.AlignHCenter @@ -46,6 +50,7 @@ Pane { } } + Item { Layout.fillHeight: true; } RowLayout { Button { diff --git a/resources/qml/device-verification/EmojiVerification.qml b/resources/qml/device-verification/EmojiVerification.qml index ded163bd..4c5bfb1a 100644 --- a/resources/qml/device-verification/EmojiVerification.qml +++ b/resources/qml/device-verification/EmojiVerification.qml @@ -10,13 +10,16 @@ import im.nheko 1.0 Pane { property string title: qsTr("Verification Code") + background: Rectangle { + color: Nheko.colors.window + } ColumnLayout { + anchors.fill: parent spacing: 16 Label { - Layout.maximumWidth: 400 - Layout.fillHeight: true + Layout.preferredWidth: 400 Layout.fillWidth: true wrapMode: Text.Wrap text: qsTr("Please verify the following emoji. You should see the same emoji on both sides. If they differ, please press 'They do not match!' to abort verification!") @@ -24,6 +27,7 @@ Pane { verticalAlignment: Text.AlignVCenter } + Item { Layout.fillHeight: true; } RowLayout { id: emojis @@ -391,6 +395,7 @@ Pane { } } + Item { Layout.fillHeight: true; } RowLayout { Button { diff --git a/resources/qml/device-verification/Failed.qml b/resources/qml/device-verification/Failed.qml index 83f4218a..d070b5a6 100644 --- a/resources/qml/device-verification/Failed.qml +++ b/resources/qml/device-verification/Failed.qml @@ -10,15 +10,18 @@ import im.nheko 1.0 Pane { property string title: qsTr("Verification failed") + background: Rectangle { + color: Nheko.colors.window + } ColumnLayout { + anchors.fill: parent spacing: 16 Text { id: content - Layout.maximumWidth: 400 - Layout.fillHeight: true + Layout.preferredWidth: 400 Layout.fillWidth: true wrapMode: Text.Wrap text: { @@ -43,6 +46,8 @@ Pane { verticalAlignment: Text.AlignVCenter } + Item { Layout.fillHeight: true; } + RowLayout { Item { Layout.fillWidth: true diff --git a/resources/qml/device-verification/NewVerificationRequest.qml b/resources/qml/device-verification/NewVerificationRequest.qml index 7facb725..b7ed9586 100644 --- a/resources/qml/device-verification/NewVerificationRequest.qml +++ b/resources/qml/device-verification/NewVerificationRequest.qml @@ -10,15 +10,18 @@ import im.nheko 1.0 Pane { property string title: flow.sender ? qsTr("Send Verification Request") : qsTr("Received Verification Request") + background: Rectangle { + color: Nheko.colors.window + } ColumnLayout { + anchors.fill: parent spacing: 16 Label { // Self verification - Layout.maximumWidth: 400 - Layout.fillHeight: true + Layout.preferredWidth: 400 Layout.fillWidth: true wrapMode: Text.Wrap text: { @@ -43,6 +46,8 @@ Pane { verticalAlignment: Text.AlignVCenter } + Item { Layout.fillHeight: true; } + RowLayout { Button { Layout.alignment: Qt.AlignLeft diff --git a/resources/qml/device-verification/Success.qml b/resources/qml/device-verification/Success.qml index c74f0ea8..8d7c8419 100644 --- a/resources/qml/device-verification/Success.qml +++ b/resources/qml/device-verification/Success.qml @@ -10,15 +10,18 @@ import im.nheko 1.0 Pane { property string title: qsTr("Successful Verification") + background: Rectangle { + color: Nheko.colors.window + } ColumnLayout { + anchors.fill: parent spacing: 16 Label { id: content - Layout.maximumWidth: 400 - Layout.fillHeight: true + Layout.preferredWidth: 400 Layout.fillWidth: true wrapMode: Text.Wrap text: qsTr("Verification successful! Both sides verified their devices!") @@ -26,6 +29,8 @@ Pane { verticalAlignment: Text.AlignVCenter } + Item { Layout.fillHeight: true; } + RowLayout { Item { Layout.fillWidth: true diff --git a/resources/qml/device-verification/Waiting.qml b/resources/qml/device-verification/Waiting.qml index 4584a202..e75a97ce 100644 --- a/resources/qml/device-verification/Waiting.qml +++ b/resources/qml/device-verification/Waiting.qml @@ -11,15 +11,18 @@ import im.nheko 1.0 Pane { property string title: qsTr("Waiting for other party…") + background: Rectangle { + color: Nheko.colors.window + } ColumnLayout { + anchors.fill: parent spacing: 16 Label { id: content - Layout.maximumWidth: 400 - Layout.fillHeight: true + Layout.preferredWidth: 400 Layout.fillWidth: true wrapMode: Text.Wrap text: { @@ -36,10 +39,12 @@ Pane { verticalAlignment: Text.AlignVCenter } + Item { Layout.fillHeight: true; } Spinner { Layout.alignment: Qt.AlignHCenter foreground: Nheko.colors.mid } + Item { Layout.fillHeight: true; } RowLayout { Button {