Fix device verification colors

This commit is contained in:
Nicolas Werner 2022-01-12 06:44:51 +01:00
parent 39bf20baed
commit 41a9577201
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
8 changed files with 46 additions and 67 deletions

View file

@ -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
}
}
}
}

View file

@ -14,10 +14,11 @@ ApplicationWindow {
property var flow property var flow
onClosing: VerificationManager.removeVerificationFlow(flow) onClosing: VerificationManager.removeVerificationFlow(flow)
title: stack.currentItem.title title: stack.currentItem.title_
modality: Qt.NonModal modality: Qt.NonModal
palette: Nheko.colors palette: Nheko.colors
height: stack.implicitHeight color: Nheko.colors.window
minimumHeight: stack.implicitHeight
width: stack.implicitWidth width: stack.implicitWidth
flags: Qt.Dialog | Qt.WindowCloseButtonHint | Qt.WindowTitleHint flags: Qt.Dialog | Qt.WindowCloseButtonHint | Qt.WindowTitleHint
Component.onCompleted: Nheko.reparent(dialog) Component.onCompleted: Nheko.reparent(dialog)
@ -25,6 +26,7 @@ ApplicationWindow {
StackView { StackView {
id: stack id: stack
anchors.fill: parent
initialItem: newVerificationRequest initialItem: newVerificationRequest
implicitWidth: currentItem.implicitWidth implicitWidth: currentItem.implicitWidth
implicitHeight: currentItem.implicitHeight implicitHeight: currentItem.implicitHeight

View file

@ -10,13 +10,16 @@ import im.nheko 1.0
Pane { Pane {
property string title: qsTr("Verification Code") property string title: qsTr("Verification Code")
background: Rectangle {
color: Nheko.colors.window
}
ColumnLayout { ColumnLayout {
anchors.fill: parent
spacing: 16 spacing: 16
Label { Label {
Layout.maximumWidth: 400 Layout.preferredWidth: 400
Layout.fillHeight: true
Layout.fillWidth: true Layout.fillWidth: true
wrapMode: Text.Wrap 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!") 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 verticalAlignment: Text.AlignVCenter
} }
Item { Layout.fillHeight: true; }
RowLayout { RowLayout {
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
@ -46,6 +50,7 @@ Pane {
} }
} }
Item { Layout.fillHeight: true; }
RowLayout { RowLayout {
Button { Button {

View file

@ -10,13 +10,16 @@ import im.nheko 1.0
Pane { Pane {
property string title: qsTr("Verification Code") property string title: qsTr("Verification Code")
background: Rectangle {
color: Nheko.colors.window
}
ColumnLayout { ColumnLayout {
anchors.fill: parent
spacing: 16 spacing: 16
Label { Label {
Layout.maximumWidth: 400 Layout.preferredWidth: 400
Layout.fillHeight: true
Layout.fillWidth: true Layout.fillWidth: true
wrapMode: Text.Wrap 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!") 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 verticalAlignment: Text.AlignVCenter
} }
Item { Layout.fillHeight: true; }
RowLayout { RowLayout {
id: emojis id: emojis
@ -391,6 +395,7 @@ Pane {
} }
} }
Item { Layout.fillHeight: true; }
RowLayout { RowLayout {
Button { Button {

View file

@ -10,15 +10,18 @@ import im.nheko 1.0
Pane { Pane {
property string title: qsTr("Verification failed") property string title: qsTr("Verification failed")
background: Rectangle {
color: Nheko.colors.window
}
ColumnLayout { ColumnLayout {
anchors.fill: parent
spacing: 16 spacing: 16
Text { Text {
id: content id: content
Layout.maximumWidth: 400 Layout.preferredWidth: 400
Layout.fillHeight: true
Layout.fillWidth: true Layout.fillWidth: true
wrapMode: Text.Wrap wrapMode: Text.Wrap
text: { text: {
@ -43,6 +46,8 @@ Pane {
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
} }
Item { Layout.fillHeight: true; }
RowLayout { RowLayout {
Item { Item {
Layout.fillWidth: true Layout.fillWidth: true

View file

@ -10,15 +10,18 @@ import im.nheko 1.0
Pane { Pane {
property string title: flow.sender ? qsTr("Send Verification Request") : qsTr("Received Verification Request") property string title: flow.sender ? qsTr("Send Verification Request") : qsTr("Received Verification Request")
background: Rectangle {
color: Nheko.colors.window
}
ColumnLayout { ColumnLayout {
anchors.fill: parent
spacing: 16 spacing: 16
Label { Label {
// Self verification // Self verification
Layout.maximumWidth: 400 Layout.preferredWidth: 400
Layout.fillHeight: true
Layout.fillWidth: true Layout.fillWidth: true
wrapMode: Text.Wrap wrapMode: Text.Wrap
text: { text: {
@ -43,6 +46,8 @@ Pane {
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
} }
Item { Layout.fillHeight: true; }
RowLayout { RowLayout {
Button { Button {
Layout.alignment: Qt.AlignLeft Layout.alignment: Qt.AlignLeft

View file

@ -10,15 +10,18 @@ import im.nheko 1.0
Pane { Pane {
property string title: qsTr("Successful Verification") property string title: qsTr("Successful Verification")
background: Rectangle {
color: Nheko.colors.window
}
ColumnLayout { ColumnLayout {
anchors.fill: parent
spacing: 16 spacing: 16
Label { Label {
id: content id: content
Layout.maximumWidth: 400 Layout.preferredWidth: 400
Layout.fillHeight: true
Layout.fillWidth: true Layout.fillWidth: true
wrapMode: Text.Wrap wrapMode: Text.Wrap
text: qsTr("Verification successful! Both sides verified their devices!") text: qsTr("Verification successful! Both sides verified their devices!")
@ -26,6 +29,8 @@ Pane {
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
} }
Item { Layout.fillHeight: true; }
RowLayout { RowLayout {
Item { Item {
Layout.fillWidth: true Layout.fillWidth: true

View file

@ -11,15 +11,18 @@ import im.nheko 1.0
Pane { Pane {
property string title: qsTr("Waiting for other party…") property string title: qsTr("Waiting for other party…")
background: Rectangle {
color: Nheko.colors.window
}
ColumnLayout { ColumnLayout {
anchors.fill: parent
spacing: 16 spacing: 16
Label { Label {
id: content id: content
Layout.maximumWidth: 400 Layout.preferredWidth: 400
Layout.fillHeight: true
Layout.fillWidth: true Layout.fillWidth: true
wrapMode: Text.Wrap wrapMode: Text.Wrap
text: { text: {
@ -36,10 +39,12 @@ Pane {
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
} }
Item { Layout.fillHeight: true; }
Spinner { Spinner {
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
foreground: Nheko.colors.mid foreground: Nheko.colors.mid
} }
Item { Layout.fillHeight: true; }
RowLayout { RowLayout {
Button { Button {