| 1 |
// SPDX-FileCopyrightText: Nheko Contributors |
| 2 |
// |
| 3 |
// SPDX-License-Identifier: GPL-3.0-or-later |
| 4 |
|
| 5 |
import QtQuick |
| 6 |
import QtQuick.Controls |
| 7 |
import QtQuick.Layouts |
| 8 |
|
| 9 |
Rectangle { |
| 10 |
color: "red" |
| 11 |
implicitHeight: Qt.application.font.pixelSize * 4 |
| 12 |
implicitWidth: col.width |
| 13 |
height: Qt.application.font.pixelSize * 4 |
| 14 |
width: col.width |
| 15 |
|
| 16 |
ColumnLayout { |
| 17 |
id: col |
| 18 |
|
| 19 |
property var emoji: emojis.mapping[Math.floor(Math.random() * 64)] |
| 20 |
|
| 21 |
anchors.bottom: parent.bottom |
| 22 |
|
| 23 |
Label { |
| 24 |
Layout.preferredHeight: font.pixelSize * 2 |
| 25 |
Layout.alignment: Qt.AlignHCenter |
| 26 |
text: col.emoji.emoji |
| 27 |
font.pixelSize: Qt.application.font.pixelSize * 2 |
| 28 |
} |
| 29 |
|
| 30 |
Label { |
| 31 |
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom |
| 32 |
text: col.emoji.description |
| 33 |
} |
| 34 |
|
| 35 |
} |
| 36 |
|
| 37 |
} |