Remove HRichLabel component
Sparsly used and inflexible, just use HLabel
This commit is contained in:
parent
02982f9dc3
commit
229fbee298
|
@ -13,4 +13,6 @@ Label {
|
|||
linkColor: theme.colors.link
|
||||
|
||||
maximumLineCount: elide === Label.ElideNone ? Number.MAX_VALUE : 1
|
||||
|
||||
onLinkActivated: Qt.openUrlExternally(link)
|
||||
}
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
// SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
|
||||
import QtQuick 2.12
|
||||
|
||||
HLabel {
|
||||
// https://blog.shantanu.io/2015/02/15/creating-working-hyperlinks-in-qtquick-text/
|
||||
id: label
|
||||
textFormat: Text.RichText
|
||||
onLinkActivated: Qt.openUrlExternally(link)
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
acceptedButtons: Qt.NoButton
|
||||
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
|
||||
}
|
||||
}
|
|
@ -16,7 +16,6 @@ TextEdit {
|
|||
activeFocusOnPress: false
|
||||
focus: false
|
||||
selectByMouse: true
|
||||
|
||||
onLinkActivated: if (enableLinkActivation) Qt.openUrlExternally(link)
|
||||
|
||||
|
||||
|
|
|
@ -4,7 +4,9 @@ import QtQuick 2.12
|
|||
import QtQuick.Layouts 1.12
|
||||
import ".."
|
||||
|
||||
HRichLabel {
|
||||
HLabel {
|
||||
property HTile tile
|
||||
|
||||
textFormat: Text.StyledText
|
||||
font.pixelSize: theme.fontSize.small
|
||||
verticalAlignment: Qt.AlignVCenter
|
||||
|
@ -16,9 +18,12 @@ HRichLabel {
|
|||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
|
||||
|
||||
property HTile tile
|
||||
|
||||
|
||||
Behavior on Layout.maximumHeight { HNumberAnimation {} }
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
acceptedButtons: Qt.NoButton
|
||||
cursorShape:
|
||||
parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
|
||||
}
|
||||
}
|
||||
|
|
|
@ -79,7 +79,7 @@ Rectangle {
|
|||
HoverHandler { id: nameHover }
|
||||
}
|
||||
|
||||
HRichLabel {
|
||||
HLabel {
|
||||
id: topicLabel
|
||||
text: chat.roomInfo.topic
|
||||
textFormat: Text.StyledText
|
||||
|
@ -103,6 +103,13 @@ Rectangle {
|
|||
Layout.fillHeight: true
|
||||
|
||||
HoverHandler { id: topicHover }
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
acceptedButtons: Qt.NoButton
|
||||
cursorShape:
|
||||
parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
|
||||
}
|
||||
}
|
||||
|
||||
HToolTip {
|
||||
|
|
Loading…
Reference in New Issue
Block a user