diff --git a/ui/qml/OutlineView.qml b/ui/qml/OutlineView.qml index 4364e3b..e2c3d4d 100644 --- a/ui/qml/OutlineView.qml +++ b/ui/qml/OutlineView.qml @@ -404,35 +404,41 @@ ListView { Component { id: tableComponent Rectangle { + id: tableRect color: theme.alternateBaseColor radius: 4 - implicitHeight: tableGrid.implicitHeight + 12 - implicitWidth: tableGrid.implicitWidth + 12 + implicitHeight: tableColumn.implicitHeight + 16 - GridLayout { - id: tableGrid - anchors.centerIn: parent - anchors.margins: 6 - columns: (modelData.rows && modelData.rows.length > 0) ? modelData.rows[0].length : 1 - rowSpacing: 4 - columnSpacing: 12 + property var tableData: modelData + + ColumnLayout { + id: tableColumn + anchors.left: parent.left + anchors.top: parent.top + anchors.margins: 8 + spacing: 2 Repeater { - model: modelData.rows ?? [] + model: tableRect.tableData.rows ?? [] - Repeater { + RowLayout { required property var modelData required property int index - property bool isHeader: index === 0 && tableComponent.modelData.hasHeader - model: modelData + property bool isHeader: index === 0 && (tableRect.tableData.hasHeader ?? false) + spacing: 16 - Label { - required property string modelData - text: modelData - color: parent.isHeader ? theme.textColor : theme.placeholderTextColor - font.bold: parent.isHeader - font.pointSize: outline.baseFontSize - horizontalAlignment: Text.AlignLeft + Repeater { + model: modelData + + Label { + required property string modelData + Layout.minimumWidth: 60 + text: modelData + color: parent.isHeader ? theme.textColor : theme.placeholderTextColor + font.bold: parent.isHeader + font.pointSize: outline.baseFontSize + horizontalAlignment: Text.AlignLeft + } } } }