mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-05-03 22:56:49 +00:00
Add cursor shape option on Tooltip as hovering cannot be propagate
This commit is contained in:
parent
bbebbbba78
commit
e79ced8366
2 changed files with 12 additions and 10 deletions
|
|
@ -14,6 +14,7 @@ MouseArea {
|
|||
property var tooltipParent: parent
|
||||
|
||||
property bool _visible: false
|
||||
property int hoveringCursor : Qt.ArrowCursor
|
||||
|
||||
anchors.fill:parent
|
||||
|
||||
|
|
@ -21,6 +22,8 @@ MouseArea {
|
|||
scrollGestureEnabled: true
|
||||
|
||||
onContainsMouseChanged: _visible = containsMouse
|
||||
cursorShape: containsMouse ? hoveringCursor : Qt.ArrowCursor
|
||||
|
||||
onPressed: mouse.accepted = false
|
||||
onWheel: {
|
||||
_visible = false
|
||||
|
|
|
|||
|
|
@ -30,11 +30,11 @@ Item {
|
|||
spacing: ChatStyle.entry.message.extraContent.spacing
|
||||
|
||||
Component {
|
||||
id: icon
|
||||
id: iconComponent
|
||||
|
||||
Icon {
|
||||
|
||||
readonly property bool isError: Utils.includes([
|
||||
id: iconId
|
||||
readonly property var isError: Utils.includes([
|
||||
ChatModel.MessageStatusFileTransferError,
|
||||
ChatModel.MessageStatusNotDelivered,
|
||||
], $chatEntry.status)
|
||||
|
|
@ -48,19 +48,18 @@ Item {
|
|||
iconSize: ChatStyle.entry.message.outgoing.sendIconSize
|
||||
|
||||
MouseArea {
|
||||
id:retryAction
|
||||
anchors.fill: parent
|
||||
cursorShape: containsMouse
|
||||
? Qt.PointingHandCursor
|
||||
: Qt.ArrowCursor
|
||||
hoverEnabled: true
|
||||
visible: icon.isError || $chatEntry.status === ChatModel.MessageStatusIdle
|
||||
visible: iconId.isError || $chatEntry.status === ChatModel.MessageStatusIdle
|
||||
onClicked: proxyModel.resendMessage(index)
|
||||
}
|
||||
|
||||
TooltipArea {
|
||||
text: isError
|
||||
id:tooltip
|
||||
text: iconId.isError
|
||||
? qsTr('messageError')
|
||||
: (isRead ? qsTr('messageRead') : qsTr('messageDelivered'))
|
||||
hoveringCursor : retryAction.visible?Qt.PointingHandCursor:Qt.ArrowCursor
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -86,7 +85,7 @@ Item {
|
|||
|
||||
sourceComponent: $chatEntry.status === ChatModel.MessageStatusInProgress || $chatEntry.status === ChatModel.MessageStatusFileTransferInProgress
|
||||
? indicator
|
||||
: icon
|
||||
: iconComponent
|
||||
}
|
||||
|
||||
ActionButton {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue