mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
Added user interaction capabilities to InfoFavorites.
This commit is contained in:
parent
8aaefd4a4e
commit
11456f8a1d
@ -5,6 +5,18 @@ import QtGraphicalEffects 1.0
|
|||||||
Item {
|
Item {
|
||||||
width: 20
|
width: 20
|
||||||
height: 20
|
height: 20
|
||||||
|
|
||||||
|
property bool active
|
||||||
|
|
||||||
|
signal activeChangedByUser(bool read)
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: favorites_button_compact
|
||||||
|
onClicked: {
|
||||||
|
activeChangedByUser(!active);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
id: favorites_button_compact
|
id: favorites_button_compact
|
||||||
@ -14,7 +26,7 @@ Item {
|
|||||||
ColorOverlay {
|
ColorOverlay {
|
||||||
anchors.fill: favorites_button_compact
|
anchors.fill: favorites_button_compact
|
||||||
source: favorites_button_compact
|
source: favorites_button_compact
|
||||||
color: "#e84852"
|
color: active ? "#e84852" : "#1c1c1c"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user