moment/src/gui/Base/AutoDirectionLayout.qml
2020-07-21 17:34:45 -04:00

18 lines
420 B
QML

// SPDX-License-Identifier: LGPL-3.0-or-later
import QtQuick 2.12
import QtQuick.Layouts 1.12
HGridLayout {
readonly property real summedImplicitWidth:
utils.sumChildrenImplicitWidths(visibleChildren, columnSpacing)
readonly property bool vertical: flow === HGridLayout.TopToBottom
flow:
width >= summedImplicitWidth ?
HGridLayout.LeftToRight :
HGridLayout.TopToBottom
}