linphone-desktop/ui/modules/Common/Form/Placements/FormLine.qml
2017-06-14 18:05:18 +02:00

24 lines
759 B
QML

import QtQuick 2.7
import Common.Styles 1.0
// =============================================================================
Row {
readonly property double maxItemWidth: {
var n = children.length
var curWidth = width / n - (n - 1) * spacing
var maxWidth = orientation === Qt.Horizontal
? FormHGroupStyle.legend.width + FormHGroupStyle.content.maxWidth + FormHGroupStyle.spacing
: FormVGroupStyle.content.maxWidth
return curWidth < maxWidth ? curWidth : maxWidth
}
readonly property int orientation: parent.orientation
readonly property bool dealWithErrors: parent.dealWithErrors
// ---------------------------------------------------------------------------
spacing: FormLineStyle.spacing
width: parent.width
}