Fix Verification Window Sizing

Update the layouts in the device verifcation process to make sure that all possible window sizes can be handled

BUG: 485309
This commit is contained in:
James Graham
2024-04-13 18:51:06 +00:00
parent 17d60b79ca
commit ef34ed7c20
6 changed files with 171 additions and 84 deletions

View File

@@ -3,12 +3,12 @@
import QtQuick
import QtQuick.Controls as QQC2
import QtQml
import QtQuick.Layouts
import org.kde.kirigami as Kirigami
import org.kde.neochat
Column {
ColumnLayout {
id: root
required property var model
@@ -16,24 +16,30 @@ Column {
signal accept
signal reject
visible: dialog.session.state === KeyVerificationSession.WAITINGFORVERIFICATION
anchors.centerIn: parent
spacing: Kirigami.Units.largeSpacing
Item {
Layout.fillHeight: true
}
QQC2.Label {
Layout.fillWidth: true
text: i18n("Confirm the emoji below are displayed on both devices, in the same order.")
horizontalAlignment: Text.AlignHCenter
wrapMode: Text.Wrap
}
EmojiRow {
anchors.horizontalCenter: parent.horizontalCenter
height: Kirigami.Units.gridUnit * 4
Layout.maximumWidth: implicitWidth
Layout.alignment: Qt.AlignHCenter
model: root.model.slice(0, 4)
}
EmojiRow {
anchors.horizontalCenter: parent.horizontalCenter
height: Kirigami.Units.gridUnit * 4
Layout.maximumWidth: implicitWidth
Layout.alignment: Qt.AlignHCenter
model: root.model.slice(4, 7)
}
Row {
anchors.horizontalCenter: parent.horizontalCenter
RowLayout {
Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter
QQC2.Button {
anchors.bottom: parent.bottom
text: i18n("They match")
@@ -47,4 +53,7 @@ Column {
onClicked: root.reject()
}
}
Item {
Layout.fillHeight: true
}
}