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

27 lines
629 B
QML
Raw Normal View History

2020-03-20 23:07:26 +03:00
import QtQuick 2.3
2020-09-14 14:57:49 +03:00
import QtQuick.Controls 2.10
2020-03-20 23:07:26 +03:00
import QtQuick.Layouts 1.10
Rectangle {
color: "red"
implicitHeight: Qt.application.font.pixelSize * 4
implicitWidth: col.width
height: Qt.application.font.pixelSize * 4
width: col.width
ColumnLayout {
id: col
anchors.bottom: parent.bottom
property var emoji: emojis.mapping[Math.floor(Math.random()*64)]
Label {
2020-03-20 23:07:26 +03:00
height: font.pixelSize * 2
Layout.alignment: Qt.AlignHCenter
text: col.emoji.emoji
font.pixelSize: Qt.application.font.pixelSize * 2
}
Label {
2020-03-20 23:07:26 +03:00
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
text: col.emoji.description
}
}
}