summaryrefslogtreecommitdiff
path: root/Home/Default
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2023-03-27 17:26:21 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2023-03-27 17:26:21 +0800
commitb80e3776a8c1e9a44ad56240c80dcd0d71146893 (patch)
treecfac09d225ba455f0446bdf913fe7366e83ad270 /Home/Default
parente0c44b6f8f352ccfe2456e4f7d08b196af23d404 (diff)
Rating stars
Diffstat (limited to 'Home/Default')
-rw-r--r--Home/Default/Card.ui.qml21
1 files changed, 20 insertions, 1 deletions
diff --git a/Home/Default/Card.ui.qml b/Home/Default/Card.ui.qml
index c4b64bc..beb3c13 100644
--- a/Home/Default/Card.ui.qml
+++ b/Home/Default/Card.ui.qml
@@ -19,6 +19,7 @@ Item {
property string titleText: "Build Responsive Websites with HTML"
property alias titleArea: titleArea
property string truncatedText: "Far advanced settling say finished raillery. Offered chiefly farther"
+ property real rating: 4.0
DropShadow {
source: rectangle
@@ -137,7 +138,25 @@ Item {
}
RowLayout {
- id: listInline
+ Repeater {
+ model: 5
+ Image {
+ source: (index + 1) / rating <= 1.0
+ ? "../../Font-Awesome/svgs/solid/star.svg"
+ : (index + 1) / rating < 1.25
+ ? "../../Font-Awesome/svgs/solid/star-half-stroke.svg"
+ : "../../Font-Awesome/svgs/regular/star.svg"
+ sourceSize {
+ width: 15
+ height: 13
+ }
+ ColorOverlay {
+ anchors.fill: parent
+ source: parent
+ color: "#f7c32e"
+ }
+ }
+ }
}
}