Warning, /frameworks/kirigami/src/controls/FlexColumn.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 * SPDX-FileCopyrightText: 2020 Carson Black <uhhadd@gmail.com> 0003 * 0004 * SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 import QtQuick 0008 import QtQuick.Layouts 0009 import org.kde.kirigami as Kirigami 0010 0011 //TODO KF6: how much is this used? can be removed? 0012 /** 0013 * @brief FlexColumn is a column that grows in width to a fixed cap. 0014 * @inherit QtQuick.Layouts.ColumnLayout 0015 */ 0016 ColumnLayout { 0017 id: __outer 0018 0019 default property alias columnChildren: __inner.children 0020 0021 /** 0022 * @brief This property holds the column's offset from the cross axis. 0023 * 0024 * Note that padding is applied on both sides 0025 * when the column is aligned to a centered cross axis. 0026 * 0027 * default: ``Kirigami.Units.largeSpacing`` 0028 */ 0029 property real padding: Kirigami.Units.largeSpacing 0030 0031 /** 0032 * @brief This property holds maximum column width. 0033 * 0034 * default: ``Kirigami.Units.gridUnit * 50`` 0035 */ 0036 property real maximumWidth: Kirigami.Units.gridUnit * 50 0037 0038 /** 0039 * @brief This property sets column's alignment when it hits its maximum width. 0040 * 0041 * default: ``Qt.AlignHCenter | Qt.AlignTop`` 0042 * 0043 * @property Qt::Alignment alignment 0044 */ 0045 property int alignment: Qt.AlignHCenter | Qt.AlignTop 0046 0047 /** 0048 * @brief This property holds the inner column's width. 0049 */ 0050 property real innerWidth: __inner.width 0051 0052 Layout.fillWidth: true 0053 Layout.fillHeight: true 0054 0055 enum CrossAxis { 0056 Left, 0057 Center, 0058 Right 0059 } 0060 0061 ColumnLayout { 0062 id: __inner 0063 spacing: __outer.spacing 0064 Layout.maximumWidth: __outer.maximumWidth 0065 Layout.leftMargin: __outer.alignment & Qt.AlignLeft || __outer.alignment & Qt.AlignHCenter ? __outer.padding : 0 0066 Layout.rightMargin: __outer.alignment & Qt.AlignRight || __outer.alignment & Qt.AlignHCenter ? __outer.padding : 0 0067 Layout.alignment: __outer.alignment 0068 } 0069 }