Added a mouse click handler to InfoTick view plus a signal for notifying user interaction.

This commit is contained in:
Luis Ángel San Martín 2016-04-13 18:02:02 +02:00
parent b13cf09c09
commit 0c95001fc5

View File

@ -4,15 +4,26 @@ import QtGraphicalEffects 1.0
Item { Item {
property bool read
signal readChangedByUser(bool read)
MouseArea {
anchors.fill: read_compact
onClicked: {
readChangedByUser(!read);
}
}
Image { Image {
id: read_compact id: read_compact
source: "info-tick.png" source: "info-tick.png"
} }
ColorOverlay { ColorOverlay {
anchors.fill: read_compact anchors.fill: read_compact
source: read_compact source: read_compact
color: true ? "#e84852" : "#1c1c1c" color: read ? "#e84852" : "#1c1c1c"
} }
} }