Add full name/topic tooltip to room header
This commit is contained in:
@@ -11,6 +11,10 @@ ToolTip {
|
||||
theme.fontSize.normal * 0.5 * 75,
|
||||
)
|
||||
|
||||
|
||||
property alias label: label
|
||||
|
||||
|
||||
background: Rectangle {
|
||||
id: background
|
||||
color: theme.controls.toolTip.background
|
||||
@@ -19,6 +23,7 @@ ToolTip {
|
||||
}
|
||||
|
||||
contentItem: HLabel {
|
||||
id: label
|
||||
color: theme.controls.toolTip.text
|
||||
text: toolTip.text
|
||||
wrapMode: Text.Wrap
|
||||
|
@@ -43,6 +43,8 @@ Rectangle {
|
||||
viewButtons.width -
|
||||
(expandButton.visible ? expandButton.width : 0)
|
||||
)
|
||||
|
||||
HoverHandler { id: nameHover }
|
||||
}
|
||||
|
||||
HLabel {
|
||||
@@ -60,6 +62,20 @@ Rectangle {
|
||||
roomName.width - viewButtons.width -
|
||||
(expandButton.visible ? expandButton.width : 0)
|
||||
)
|
||||
|
||||
HoverHandler { id: topicHover }
|
||||
}
|
||||
|
||||
HToolTip {
|
||||
text: name && topic ? (name + "<br>" + topic) : (name || topic)
|
||||
label.textFormat: Text.StyledText
|
||||
visible: text && (nameHover.hovered || topicHover.hovered)
|
||||
|
||||
readonly property string name:
|
||||
roomName.truncated ?
|
||||
("<b>" + chatPage.roomInfo.display_name + "</b>") : ""
|
||||
readonly property string topic:
|
||||
roomTopic.truncated ? chatPage.roomInfo.topic : ""
|
||||
}
|
||||
|
||||
HSpacer {}
|
||||
|
Reference in New Issue
Block a user