Changeset View
Changeset View
Standalone View
Standalone View
src/apps/qml/qml/messages/ReactionsPopup.qml
| Show All 23 Lines | |||||
| 24 | 24 | | |||
| 25 | 25 | | |||
| 26 | import org.kde.kirigami 2.7 as Kirigami | 26 | import org.kde.kirigami 2.7 as Kirigami | ||
| 27 | import "../common" | 27 | import "../common" | ||
| 28 | 28 | | |||
| 29 | Kirigami.Icon { | 29 | Kirigami.Icon { | ||
| 30 | id: reactIcon | 30 | id: reactIcon | ||
| 31 | 31 | | |||
| 32 | property bool showIcon: true | ||||
| 33 | | ||||
| 32 | signal insertReaction(string emoji) | 34 | signal insertReaction(string emoji) | ||
| 33 | source: "face-smile" | 35 | source: "face-smile" | ||
| 34 | width: height | 36 | width: height | ||
| 35 | height: 18 | 37 | height: 18 | ||
| 36 | opacity: mouseArea.containsMouse ? 1.0 : 0.3 | 38 | opacity: { | ||
| 39 | if (!showIcon) { | ||||
| 40 | return 0.0; | ||||
| 41 | } | ||||
| 42 | else { | ||||
| 43 | return mouseArea.containsMouse ? 1.0 : 0.3; | ||||
| 44 | } | ||||
| 45 | } | ||||
| 37 | 46 | | |||
| 38 | MouseArea { | 47 | MouseArea { | ||
| 39 | id: mouseArea | 48 | id: mouseArea | ||
| 40 | anchors.fill: parent | 49 | anchors.fill: parent | ||
| 41 | hoverEnabled: true | 50 | hoverEnabled: true | ||
| 42 | cursorShape: containsMouse ? Qt.PointingHandCursor : Qt.ArrowCursor | 51 | cursorShape: containsMouse ? Qt.PointingHandCursor : Qt.ArrowCursor | ||
| 43 | onClicked: { | 52 | onClicked: { | ||
| 44 | if (emoticonMenuLoader.active) | 53 | if (emoticonMenuLoader.active) | ||
| Show All 24 Lines | |||||