EventDelegate context menu, EventFile click

Improve/extend choosing the cursor shape, how context menu handles the
current hovered thing, and open link on EventFile click
This commit is contained in:
miruka
2019-09-14 18:33:32 -04:00
parent a80f294610
commit c6395ff940
6 changed files with 70 additions and 58 deletions

View File

@@ -7,26 +7,16 @@ Row {
id: eventContent
spacing: theme.spacing / 1.25
readonly property string eventText: Utils.processedEventText(model)
readonly property string eventTime: Utils.formatTime(model.date, false)
readonly property string hoveredLink:
nameLabel.hoveredLink || contentLabel.hoveredLink
property string hoveredImage: ""
readonly property bool hoveredSelectable:
nameHover.hovered || contentHover.hovered
readonly property int cursorShape:
hoveredLink || hoveredImage ? Qt.PointingHandCursor :
nameHover.hovered || contentHover.hovered ? Qt.IBeamCursor :
Qt.ArrowCursor
// Needed because of eventList's MouseArea which steals the
// HSelectableLabel's MouseArea hover events
onCursorShapeChanged: eventList.cursorShape = cursorShape
HoverHandler { id: hover }
Item {
width: hideAvatar ? 0 : 58