summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2023-07-03 18:22:45 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2023-07-03 18:22:45 +0800
commit2783a52aa28044856aaa6dd6453906dbf1f501f7 (patch)
tree867e5e98033862f035168acbead513899811adcc
parent97857a18190d16f03931b3968a7110532f351552 (diff)
Card height isn't forced by cell height now
Instead, it's determined by its contents.
-rw-r--r--Home/Default.ui.qml2
-rw-r--r--Home/Default/Card.ui.qml11
2 files changed, 9 insertions, 4 deletions
diff --git a/Home/Default.ui.qml b/Home/Default.ui.qml
index 98d56f0..2a1aecb 100644
--- a/Home/Default.ui.qml
+++ b/Home/Default.ui.qml
@@ -371,8 +371,6 @@ Flickable {
delegate: Default.Card {
width: tabPane
.cellWidth
- height: tabPane
- .cellHeight
imageSource: image
badgeText: level
badgeColor: levelColor
diff --git a/Home/Default/Card.ui.qml b/Home/Default/Card.ui.qml
index bcebb31..ecaafbf 100644
--- a/Home/Default/Card.ui.qml
+++ b/Home/Default/Card.ui.qml
@@ -27,6 +27,8 @@ Item {
property real rating: 4.0
property alias footer: footer
+ height: rectangle.height + 25.6
+
DrpShdw.Box {
source: rectangle
anchors.fill: rectangle
@@ -36,10 +38,13 @@ Item {
id: rectangle
radius: 8
color: Eduport.bsCardBg
+ height: image.height + body.height
anchors {
- fill: parent
+ top: parent.top
topMargin: 25.6
+ left: parent.left
leftMargin: 12.8
+ right: parent.right
rightMargin: 12.8
}
@@ -74,13 +79,15 @@ Item {
ColumnLayout {
id: body
+ height: badgeAndFavorite.height
+ + title.height
+ + truncatedText.height
anchors {
top: image.bottom
left: parent.left
leftMargin: 20
right: parent.right
rightMargin: 20
- bottom: footer.top
}
Item {