summaryrefslogtreecommitdiff
path: root/widgets/Box.qml
blob: 9c786c788c498f4d6400892c2dc088953c6647fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import "root:/config"
import QtQuick

Grid {
    property bool vertical: parent.vertical ?? false // Propagate from parent

    flow: vertical ? Grid.TopToBottom : Grid.LeftToRight
    spacing: Appearance.spacing.small

    onVerticalChanged: {
        if (vertical) {
            rows = -1;
            columns = 1;
        } else {
            columns = -1;
            rows = 1;
        }
    }

    add: Transition {
        NumberAnimation {
            properties: "scale"
            from: 0
            to: 1
            duration: Appearance.anim.durations.normal
            easing.type: Easing.BezierSpline
            easing.bezierCurve: Appearance.anim.curves.standardDecel
        }
    }
}