Files
metabuilder/qml/components/layout/FlexCol.qml
johndoe6345789 6e394d7846 style(qt6): 80-char margin enforced — 737 violations → 29 remaining
191 files reformatted across views, components, widgets, hybrid, contexts.
New components: CCreateSchemaDialog, CAddFieldDialog, CAdminContentPanel.
JS helpers: connBadgeStatus/Text, adminStats, exampleLabels, onLevelClicked.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 15:48:39 +00:00

48 lines
1.3 KiB
QML

import QtQuick
import QtQuick.Layouts
import QmlComponents 1.0
/**
* FlexCol.qml - Vertical flex container (mirrors SCSS .flex, .flex-col
// utilities)
* Simplified ColumnLayout with common flex patterns
*
* Usage:
* FlexCol {
* Text { text: "Top" }
* Text { text: "Bottom" }
* }
*
* FlexCol {
* gap: "lg"
* align: "center"
* ...
* }
*/
ColumnLayout {
id: root
// Public properties
property string justify: "start" // start, center, end, space-between
property string align: "stretch" // start, center, end, stretch
property string gap: "sm" // none, xs, sm, md, lg, xl, or number
property bool fill: false // Fill parent height
// Apply gap
spacing: {
switch (gap) {
case "none": return 0
case "xs": return StyleVariables.spacingXs
case "sm": return StyleVariables.spacingSm
case "md": return StyleVariables.spacingMd
case "lg": return StyleVariables.spacingLg
case "xl": return StyleVariables.spacingXl
default: return parseInt(gap) || StyleVariables.spacingSm
}
}
// Fill width by default (column behavior)
Layout.fillWidth: true
Layout.fillHeight: fill
}