From 11456f8a1d8dc8ba5757714f5243e76b6204b9f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Sun, 17 Apr 2016 11:19:38 +0200 Subject: [PATCH] Added user interaction capabilities to InfoFavorites. --- YACReaderLibrary/qml/InfoFavorites.qml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/YACReaderLibrary/qml/InfoFavorites.qml b/YACReaderLibrary/qml/InfoFavorites.qml index 46ab7c9a..8fd22d3c 100644 --- a/YACReaderLibrary/qml/InfoFavorites.qml +++ b/YACReaderLibrary/qml/InfoFavorites.qml @@ -5,6 +5,18 @@ import QtGraphicalEffects 1.0 Item { width: 20 height: 20 + + property bool active + + signal activeChangedByUser(bool read) + + MouseArea { + anchors.fill: favorites_button_compact + onClicked: { + activeChangedByUser(!active); + } + } + Image { anchors.centerIn: parent id: favorites_button_compact @@ -14,7 +26,7 @@ Item { ColorOverlay { anchors.fill: favorites_button_compact source: favorites_button_compact - color: "#e84852" + color: active ? "#e84852" : "#1c1c1c" } }