Lukáš Tinkl d9d6d90dc9 [Style] remove legacy Style and its themes
- legacy Style and ThemePalette removed
- moved and deduplicated font definitions into `Theme` (unrelated to a
color palette)
- `Style.current.foo` -> `Theme.foo`
- `Style.current.fooColor` -> `Theme.palette.fooColor`
- upgrade the imports to 5.15
- removed some mode dead components

Fixes #16514
2024-10-22 15:54:31 +02:00

61 lines
1.5 KiB
QML

import QtQuick 2.15
import QtQuick.Layouts 1.15
import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1
import StatusQ.Core.Utils 0.1 as StatusQUtils
import utils 1.0
import shared.controls 1.0
import shared.panels 1.0
Badge {
id: root
property string repliedMessageContent
signal replyClicked()
implicitWidth: layout.implicitWidth + layout.anchors.leftMargin + layout.anchors.rightMargin
implicitHeight: layout.implicitHeight + layout.anchors.topMargin + layout.anchors.bottomMargin
color: hoverArea.containsMouse ? hoverArea.pressed ? Theme.palette.baseColor3 : Theme.palette.baseColor2 : Theme.palette.transparent
RowLayout {
id: layout
anchors {
fill: parent
leftMargin: 8
rightMargin: 8
topMargin: 3
bottomMargin: 3
}
spacing: 4
StatusIcon {
source: Theme.svg("reply-small-arrow")
Layout.preferredWidth: 16
Layout.preferredHeight: 16
}
StatusBaseText {
text: repliedMessageContent
maximumLineCount: 1
wrapMode: Text.Wrap
elide: Text.ElideRight
font.pixelSize: 13
Layout.maximumWidth: 300
Layout.alignment: Qt.AlignVCenter
}
}
MouseArea {
id: hoverArea
hoverEnabled: true
anchors.fill: layout
cursorShape: Qt.PointingHandCursor
onClicked: root.replyClicked()
}
}