summaryrefslogtreecommitdiff
path: root/widgets/Box.qml
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/Box.qml')
-rw-r--r--widgets/Box.qml16
1 files changed, 16 insertions, 0 deletions
diff --git a/widgets/Box.qml b/widgets/Box.qml
new file mode 100644
index 0000000..c0d7f06
--- /dev/null
+++ b/widgets/Box.qml
@@ -0,0 +1,16 @@
+import "root:/config"
+import QtQuick.Layouts
+
+GridLayout {
+ property bool vertical: false
+ property real spacing: Appearance.spacing.small
+ property bool homogenous: false
+
+ flow: vertical ? GridLayout.TopToBottom : GridLayout.LeftToRight
+ uniformCellWidths: homogenous && vertical
+ uniformCellHeights: homogenous && !vertical
+ rows: vertical ? -1 : 1
+ columns: vertical ? 1 : -1
+ rowSpacing: spacing
+ columnSpacing: spacing
+}