summaryrefslogtreecommitdiff
path: root/Home/Default.ui.qml
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2023-03-21 21:40:05 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2023-03-21 21:40:05 +0800
commitc683137864917a64cb0632007ea59dcb478622bc (patch)
tree3a4ef75a9c06c82def01fbd204fb0e0a77a33836 /Home/Default.ui.qml
parentd8b87b4215aa1d67eb2e7462d66fb21774de82bf (diff)
Move card to default home folder
Diffstat (limited to 'Home/Default.ui.qml')
-rw-r--r--Home/Default.ui.qml55
1 files changed, 38 insertions, 17 deletions
diff --git a/Home/Default.ui.qml b/Home/Default.ui.qml
index aa2c283..5c57eae 100644
--- a/Home/Default.ui.qml
+++ b/Home/Default.ui.qml
@@ -251,12 +251,20 @@ Flickable {
leftMargin: 16
right: parent.right
rightMargin: 16
- verticalCenter: parent.verticalCenter
+ verticalCenter: parent
+ .verticalCenter
}
cellWidth: 142
cellHeight: 46
- implicitHeight: Math.ceil(count / Math.floor(count / (cellWidth * count / width))) * cellHeight
- model: ["Web Design", "Development", "Graphic Design", "Marketing", "Finance"]
+ implicitHeight: Math.ceil(count
+ / Math.floor(count
+ / (cellWidth
+ * count
+ / width)
+ )) * cellHeight
+ model: ["Web Design", "Development",
+ "Graphic Design", "Marketing",
+ "Finance"]
delegate: TabItem {}
}
}
@@ -266,13 +274,20 @@ Flickable {
property real preservedAspectHeight: width * 1.6
Layout.leftMargin: -12.8
Layout.rightMargin: -12.8
- Layout.preferredHeight: width < 576
- ? preservedAspectHeight * tabsContent.currentCount
- : width < 768
- ? preservedAspectHeight / 2 * Math.ceil(tabsContent.currentCount / 2)
- : width < 992
- ? preservedAspectHeight / 3 * Math.ceil(tabsContent.currentCount / 3)
- : preservedAspectHeight / 4 * Math.ceil(tabsContent.currentCount / 4)
+ Layout.preferredHeight: body.width < 576
+ ? preservedAspectHeight
+ * tabsContent.currentCount
+ : body.width < 768
+ ? preservedAspectHeight / 2
+ * Math.ceil(tabsContent.currentCount
+ / 2)
+ : body.width < 992
+ ? preservedAspectHeight / 3
+ * Math.ceil(tabsContent.currentCount
+ / 3)
+ : preservedAspectHeight / 4
+ * Math.ceil(tabsContent.currentCount
+ / 4)
Repeater {
id: tabsContent
@@ -351,20 +366,26 @@ Flickable {
GridView {
id: tabPane
interactive: false
- cellWidth: width < 576 ? width
- : width < 768 ? width / 2
- : width < 992 ? width / 3
+ cellWidth: body.width < 576
+ ? width
+ : body.width < 768
+ ? width / 2
+ : body.width < 992
+ ? width / 3
: width / 4
cellHeight: cellWidth
* 400 / 533 + 273.35
model: content
- delegate: CardGrid {
- width: tabPane.cellWidth
- height: tabPane.cellHeight
+ delegate: Default.Card {
+ width: tabPane
+ .cellWidth
+ height: tabPane
+ .cellHeight
imageSource: image
badgeText: level
badgeColor: levelColor
- badgeBackgroundColor: levelBackgroundColor
+ badgeBackgroundColor
+ : levelBackgroundColor
titleText: title
truncatedText: truncated
}