summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2022-11-14 20:28:43 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2022-11-14 20:28:43 +0800
commit9d48a9bb40b9bd2117fdffadc8c1593e54b3e79b (patch)
treeb8c0b879dfa4d76c4f96147fefb801f7beeeeaba
parent9df94ecca05c8756d2db9aab79752ca78e4ebb16 (diff)
Remove dependency on stack (width)
Comparison can be done to the grid's own width.
-rw-r--r--DefaultHomeStackView.ui.qml11
1 files changed, 4 insertions, 7 deletions
diff --git a/DefaultHomeStackView.ui.qml b/DefaultHomeStackView.ui.qml
index dcfd080..4113bd8 100644
--- a/DefaultHomeStackView.ui.qml
+++ b/DefaultHomeStackView.ui.qml
@@ -4,7 +4,6 @@ import QtQuick.Controls 2.15
StackView {
property alias grid: grid
- id: stack
initialItem: Item {
GridView {
@@ -61,9 +60,8 @@ StackView {
}
}
- cellWidth: width < 576 ? stack.width : width < 768
- ? stack.width / 2 : width < 992 ? stack.width / 3
- : stack.width / 4
+ cellWidth: width < 576 ? width : width < 768 ? width / 2
+ : width < 992 ? width / 3 : width / 4
cellHeight: cellWidth * 1.3
anchors {
top: parent.top
@@ -75,9 +73,8 @@ StackView {
GridView {
id: grid
- cellWidth: width < 576 ? stack.width : width < 768
- ? stack.width / 2 : width < 992 ? stack.width / 3
- : stack.width / 4
+ cellWidth: width < 576 ? width : width < 768 ? width / 2
+ : width < 992 ? width / 3 : width / 4
cellHeight: cellWidth * 1.3
anchors {
left: parent.left