summaryrefslogtreecommitdiff
path: root/widgets/Box.qml
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/Box.qml')
-rw-r--r--widgets/Box.qml22
1 files changed, 22 insertions, 0 deletions
diff --git a/widgets/Box.qml b/widgets/Box.qml
new file mode 100644
index 0000000..c1ee51d
--- /dev/null
+++ b/widgets/Box.qml
@@ -0,0 +1,22 @@
+import "root:/config"
+import QtQuick
+
+Grid {
+ property bool vertical: parent.vertical ?? false // Propagate from parent
+
+ flow: vertical ? Grid.TopToBottom : Grid.LeftToRight
+ rows: vertical ? -1 : 1
+ columns: vertical ? 1 : -1
+ spacing: Appearance.spacing.small
+
+ add: Transition {
+ NumberAnimation {
+ properties: "scale"
+ from: 0
+ to: 1
+ duration: Appearance.anim.durations.normal
+ easing.type: Easing.BezierSpline
+ easing.bezierCurve: Appearance.anim.curves.standardDecel
+ }
+ }
+}