matrixion/resources/qml/device-verification/EmojiElement.qml

38 lines
852 B
QML
Raw Normal View History

// SPDX-FileCopyrightText: Nheko Contributors
//
2021-03-05 02:35:15 +03:00
// SPDX-License-Identifier: GPL-3.0-or-later
2023-10-26 17:43:09 +03:00
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
2020-03-20 23:07:26 +03:00
Rectangle {
2020-10-08 22:11:21 +03:00
color: "red"
implicitHeight: Qt.application.font.pixelSize * 4
implicitWidth: col.width
height: Qt.application.font.pixelSize * 4
width: col.width
ColumnLayout {
id: col
property var emoji: emojis.mapping[Math.floor(Math.random() * 64)]
anchors.bottom: parent.bottom
Label {
2023-10-26 17:43:09 +03:00
Layout.preferredHeight: font.pixelSize * 2
2020-10-08 22:11:21 +03:00
Layout.alignment: Qt.AlignHCenter
text: col.emoji.emoji
font.pixelSize: Qt.application.font.pixelSize * 2
}
Label {
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
text: col.emoji.description
}
}
2020-03-20 23:07:26 +03:00
}