matrixion/resources/qml/emoji/EmojiButton.qml

24 lines
617 B
QML
Raw Normal View History

2021-03-05 02:35:15 +03:00
// SPDX-FileCopyrightText: 2021 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later
2020-10-08 22:11:21 +03:00
import "../"
import QtQuick 2.10
import QtQuick.Controls 2.1
import im.nheko 1.0
import im.nheko.EmojiModel 1.0
ImageButton {
2020-10-08 22:11:21 +03:00
id: emojiButton
property var colors: currentActivePalette
2020-05-14 03:19:15 +03:00
property var emojiPicker
property string event_id
image: ":/icons/icons/ui/smile.png"
2020-11-16 20:41:29 +03:00
onClicked: emojiPicker.visible ? emojiPicker.close() : emojiPicker.show(emojiButton, function(emoji) {
TimelineManager.queueReactionMessage(event_id, emoji);
TimelineManager.focusMessageInput();
2020-11-16 20:41:29 +03:00
})
2020-06-10 04:31:19 +03:00
}