diff options
author | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2023-03-27 19:25:41 +0800 |
---|---|---|
committer | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2023-03-27 19:25:41 +0800 |
commit | 3f78ad957f5b43d18b61277c6808091487b595ae (patch) | |
tree | 098c5bcd4a68b468dbf53cdac01084f506f5dc43 /Home/Default | |
parent | a17109c81602d54ed875d3893d2138dacec22e30 (diff) |
Favorite implementation
Diffstat (limited to 'Home/Default')
-rw-r--r-- | Home/Default/Card.ui.qml | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/Home/Default/Card.ui.qml b/Home/Default/Card.ui.qml index c1193e1..36e9239 100644 --- a/Home/Default/Card.ui.qml +++ b/Home/Default/Card.ui.qml @@ -16,6 +16,7 @@ Item { property string badgeText: "All level" property color badgeColor: "#ff6f42c1" property color badgeBackgroundColor: "#1a6f42c1" + property alias favorite: favorite property string titleText: "Build Responsive Websites with HTML" property alias titleArea: titleArea property string truncatedText: "Far advanced settling say finished raillery. Offered chiefly farther" @@ -100,12 +101,21 @@ Item { } } - Image { + Button { id: favorite - source: "../../Font-Awesome/svgs/solid/heart.svg" - sourceSize { - width: 15 - height: 15 + display: AbstractButton.IconOnly + padding: 0 + width: 15 + height: 15 + flat: true + checkable: true + icon { + source: checked + ? "../../Font-Awesome/svgs/solid/heart.svg" + : "../../Font-Awesome/svgs/regular/heart.svg" + color: checked + ? "#d6293e" + : "transparent" } anchors { right: parent.right |