try to fix #LINQT-1605 again

This commit is contained in:
Gaelle Braud 2025-02-04 10:43:06 +01:00
parent afbf8c1fa4
commit fd57e952e4

View file

@ -14,7 +14,7 @@ Rectangle {
property var contentModel property var contentModel
property var topbarOptionalComponent property var topbarOptionalComponent
property var model property var model
color: 'white' color: DefaultStyle.grey_0
property var container property var container
property int contentHeight: contentRepeater.count > 0 ? contentRepeater.itemAt(0).height * contentRepeater.count : 0 property int contentHeight: contentRepeater.count > 0 ? contentRepeater.itemAt(0).height * contentRepeater.count : 0
property int minimumWidthForSwitchintToRowLayout: 981 * DefaultStyle.dp property int minimumWidthForSwitchintToRowLayout: 981 * DefaultStyle.dp
@ -34,10 +34,12 @@ Rectangle {
Component.onCompleted: { Component.onCompleted: {
setResponsivityFlags() setResponsivityFlags()
} }
ColumnLayout {
spacing: 0
anchors.fill: parent
Control.Control { Control.Control {
id: header id: header
anchors.left: parent.left Layout.fillWidth: true
anchors.right: parent.right
leftPadding: 45 * DefaultStyle.dp leftPadding: 45 * DefaultStyle.dp
rightPadding: 45 * DefaultStyle.dp rightPadding: 45 * DefaultStyle.dp
z: 1 z: 1
@ -97,11 +99,9 @@ Rectangle {
} }
Control.ScrollView { Control.ScrollView {
id: scrollView id: scrollView
anchors.top: header.bottom Layout.topMargin: 16 * DefaultStyle.dp
anchors.topMargin: 16 * DefaultStyle.dp Layout.fillWidth: true
anchors.bottom: parent.bottom Layout.fillHeight: true
anchors.left: parent.left
anchors.right: parent.right
leftPadding: 45 * DefaultStyle.dp leftPadding: 45 * DefaultStyle.dp
rightPadding: 45 * DefaultStyle.dp rightPadding: 45 * DefaultStyle.dp
Control.ScrollBar.vertical: ScrollBar { Control.ScrollBar.vertical: ScrollBar {
@ -119,12 +119,11 @@ Rectangle {
} }
ColumnLayout { ColumnLayout {
id: scrollViewContent id: scrollViewContent
width: parent.width width: scrollView.width - scrollView.leftPadding - scrollView.rightPadding
spacing: 10 * DefaultStyle.dp spacing: 10 * DefaultStyle.dp
Repeater { Repeater {
id: contentRepeater id: contentRepeater
model: mainItem.contentModel model: mainItem.contentModel
Layout.preferredHeight: implicitHeight
delegate: ColumnLayout { delegate: ColumnLayout {
Rectangle { Rectangle {
visible: index !== 0 visible: index !== 0
@ -185,4 +184,5 @@ Rectangle {
} }
} }
} }
}