2020-09-24 09:57:54 +10:00
|
|
|
// Copyright Mirage authors & contributors <https://github.com/mirukana/mirage>
|
2020-05-20 19:19:06 +10:00
|
|
|
// SPDX-License-Identifier: LGPL-3.0-or-later
|
|
|
|
|
|
|
|
import QtQuick 2.12
|
|
|
|
import QtQuick.Layouts 1.12
|
|
|
|
import "../../Base"
|
|
|
|
|
|
|
|
InfoBar {
|
2020-07-12 14:25:57 +10:00
|
|
|
property string replyToEventId: ""
|
|
|
|
property string replyToUserId: ""
|
|
|
|
property string replyToDisplayName: ""
|
|
|
|
|
|
|
|
signal cancel()
|
|
|
|
|
2020-05-20 19:19:06 +10:00
|
|
|
color: theme.chat.replyBar.background
|
|
|
|
icon.svgName: "reply-to"
|
|
|
|
label.textFormat: Text.StyledText
|
|
|
|
label.text:
|
2020-05-20 20:17:14 +10:00
|
|
|
replyToEventId ?
|
2020-05-20 19:19:06 +10:00
|
|
|
utils.coloredNameHtml(replyToDisplayName, replyToUserId) :
|
|
|
|
""
|
|
|
|
|
|
|
|
HButton {
|
|
|
|
backgroundColor: "transparent"
|
|
|
|
icon.name: "reply-cancel"
|
|
|
|
icon.color: theme.colors.negativeBackground
|
2020-07-14 19:24:52 +10:00
|
|
|
topPadding: 0
|
|
|
|
bottomPadding: 0
|
2020-05-20 19:19:06 +10:00
|
|
|
onClicked: cancel()
|
|
|
|
|
|
|
|
Layout.fillHeight: true
|
|
|
|
}
|
|
|
|
}
|