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 | |
parent | a17109c81602d54ed875d3893d2138dacec22e30 (diff) |
Favorite implementation
Diffstat (limited to 'Home')
-rw-r--r-- | Home/Default.ui.qml | 13 | ||||
-rw-r--r-- | Home/Default/Card.ui.qml | 20 |
2 files changed, 26 insertions, 7 deletions
diff --git a/Home/Default.ui.qml b/Home/Default.ui.qml index 19f3166..d14c849 100644 --- a/Home/Default.ui.qml +++ b/Home/Default.ui.qml @@ -269,6 +269,7 @@ Flickable { level: "All level" levelColor: "#ff6f42c1" levelBackgroundColor: "#1a6f42c1" + liked: false title: "Sketch from A to Z: for app designer" truncated: "Proposal indulged no do sociable he throwing settling." rate: 4.0 @@ -278,6 +279,7 @@ Flickable { level: "Beginner" levelColor: "#ff0cbc87" levelBackgroundColor: "#1a0cbc87" + liked: true title: "Graphic Design Masterclass" truncated: "Rooms oh fully taken by worse do Points afraid but may end Rooms" rate: 4.5 @@ -287,6 +289,7 @@ Flickable { level: "Beginner" levelColor: "#ff0cbc87" levelBackgroundColor: "#1a0cbc87" + liked: false title: "Create a Design System in Figma" truncated: "Rooms oh fully taken by worse do. Points afraid but may end afraid but may end." rate: 4.5 @@ -296,6 +299,7 @@ Flickable { level: "Beginner" levelColor: "#ff0cbc87" levelBackgroundColor: "#1a0cbc87" + liked: true title: "Deep Learning with React-Native" truncated: "Far advanced settling say finished raillery. Offered chiefly farther" rate: 4.0 @@ -305,6 +309,7 @@ Flickable { level: "All level" levelColor: "#ff6f42c1" levelBackgroundColor: "#1a6f42c1" + liked: true title: "Build Responsive Websites with HTML" truncated: "Far advanced settling say finished raillery. Offered chiefly farther" rate: 4.0 @@ -314,6 +319,7 @@ Flickable { level: "Beginner" levelColor: "#ff0cbc87" levelBackgroundColor: "#1a0cbc87" + liked: false title: "Build Websites with CSS" truncated: "Far advanced settling say finished raillery. Offered chiefly farther" rate: 4.5 @@ -323,6 +329,7 @@ Flickable { level: "All level" levelColor: "#ff6f42c1" levelBackgroundColor: "#1a6f42c1" + liked: true title: "Learn Invision" truncated: "Arrived off she elderly beloved him Course regard to up he hardly." rate: 3.5 @@ -332,6 +339,7 @@ Flickable { level: "All level" levelColor: "#ff6f42c1" levelBackgroundColor: "#1a6f42c1" + liked: false title: "JavaScript: Full Understanding" truncated: "Far advanced settling say finished raillery. Offered chiefly farther" rate: 5.0 @@ -361,8 +369,9 @@ Flickable { imageSource: image badgeText: level badgeColor: levelColor - badgeBackgroundColor - : levelBackgroundColor + badgeBackgroundColor: + levelBackgroundColor + favorite.checked: liked titleText: title truncatedText: truncated rating: rate 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 |