From 0c95001fc5e10956d1288a2e74034736eef9776d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Wed, 13 Apr 2016 18:02:02 +0200 Subject: [PATCH] Added a mouse click handler to InfoTick view plus a signal for notifying user interaction. --- YACReaderLibrary/qml/InfoTick.qml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/YACReaderLibrary/qml/InfoTick.qml b/YACReaderLibrary/qml/InfoTick.qml index 7685f4ec..f52e5402 100644 --- a/YACReaderLibrary/qml/InfoTick.qml +++ b/YACReaderLibrary/qml/InfoTick.qml @@ -4,15 +4,26 @@ import QtGraphicalEffects 1.0 Item { + property bool read + + signal readChangedByUser(bool read) + + MouseArea { + anchors.fill: read_compact + onClicked: { + readChangedByUser(!read); + } + } + Image { id: read_compact - source: "info-tick.png" } ColorOverlay { anchors.fill: read_compact source: read_compact - color: true ? "#e84852" : "#1c1c1c" + color: read ? "#e84852" : "#1c1c1c" } } +