11import QtQuick
2+ import QtQuick.Controls
23import Qt5Compat.GraphicalEffects
34
45import StatusQ.Components
3031 implicitWidth: chatText .implicitWidth
3132 implicitHeight: chatText .height + d .showMoreHeight / 2
3233
34+ signal pressAndHold (var mouseEvent)
35+
3336 QtObject {
3437 id: d
3538 property string hoveredLink: chatText .hoveredLink || root .highlightedLink
8689 color: Theme .palette .baseColor1
8790 }
8891
89- TextEdit {
92+ StatusTextArea {
9093 id: chatText
9194 objectName: " StatusTextMessage_chatText"
9295
@@ -99,17 +102,18 @@ Item {
99102 anchors .leftMargin : d .isQuote ? Theme .halfPadding : 0
100103 anchors .right : parent .right
101104 opacity: ! showMoreOpacityMask .active && ! horizontalOpacityMask .active ? 1 : 0
105+ background: null
106+ leftPadding: 0
107+ rightPadding: 0
108+ topPadding: 0
109+ bottomPadding: 0
102110 text: d .text
103111 selectedTextColor: Theme .palette .directColor1
104- selectionColor: Theme .palette .primaryColor3
105112 color: d .isQuote ? Theme .palette .baseColor1 : Theme .palette .directColor1
106- font .family : Theme .baseFont .name
107- font .pixelSize : Theme .primaryTextFontSize
108113 textFormat: Text .RichText
109114 wrapMode: root .convertToSingleLine ? Text .NoWrap : Text .Wrap
110115 readOnly: true
111- selectByMouse: true // applies to mouse only, not touch
112- enabled: ! Utils .isMobile // eats the touch events, thus breaking the context menu since this is an edit (albeit readonly)
116+ selectByMouse: ! Utils .isMobile // applies to mouse only, not touch
113117 onLinkActivated : function (link ) {
114118 if (d .showDisabledTooltipForAddressEnsName (link)) {
115119 return
@@ -127,6 +131,7 @@ Item {
127131 x: hoverHandler .point .position .x - 60
128132 y: - disabledLinkTooltip .height + hoverHandler .point .position .y - 10
129133 }
134+ onPressAndHold : mouseEvent => root .pressAndHold (mouseEvent)
130135 }
131136
132137 StatusSyntaxHighlighter {
0 commit comments