summaryrefslogtreecommitdiff
path: root/widgets/BoxLayout.qml
blob: d000bdaada2ceb1aef486184b9fc515ae25b22fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import "root:/config"
import QtQuick.Layouts

GridLayout {
    property bool vertical: parent.vertical ?? false // Propagate from parent
    property bool homogenous: false
    property int spacing: Appearance.spacing.small

    flow: vertical ? GridLayout.TopToBottom : GridLayout.LeftToRight
    uniformCellWidths: homogenous || vertical
    uniformCellHeights: homogenous || !vertical
    rows: vertical ? -1 : 1
    columns: vertical ? 1 : -1
    rowSpacing: spacing
    columnSpacing: spacing
}