fix(StatusChatInfoButton): disable hover effects when sensor is disabled
Closes #231
This commit is contained in:
parent
a3db546dc5
commit
5aaa5590c7
|
@ -22,6 +22,7 @@ Rectangle {
|
||||||
property StatusIconSettings icon: StatusIconSettings {}
|
property StatusIconSettings icon: StatusIconSettings {}
|
||||||
property int type: StatusChatInfoButton.Type.PublicChat
|
property int type: StatusChatInfoButton.Type.PublicChat
|
||||||
property alias tooltip: statusToolTip
|
property alias tooltip: statusToolTip
|
||||||
|
property alias sensor: sensor
|
||||||
|
|
||||||
signal clicked(var mouse)
|
signal clicked(var mouse)
|
||||||
signal pinnedMessagesCountClicked(var mouse)
|
signal pinnedMessagesCountClicked(var mouse)
|
||||||
|
@ -38,13 +39,13 @@ Rectangle {
|
||||||
}
|
}
|
||||||
|
|
||||||
radius: 8
|
radius: 8
|
||||||
color: sensor.containsMouse ? Theme.palette.baseColor2 : "transparent"
|
color: sensor.enabled && sensor.containsMouse ? Theme.palette.baseColor2 : "transparent"
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: sensor
|
id: sensor
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: enabled ? Qt.PointingHandCursor : Qt.ArrowCursor
|
||||||
|
|
||||||
onClicked: statusChatInfoButton.clicked(mouse)
|
onClicked: statusChatInfoButton.clicked(mouse)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue