fix #LINQT-1605 scroll in params for Qt6.5.3
edit gitignore
This commit is contained in:
parent
e6fe32cfee
commit
743a909bb1
3 changed files with 150 additions and 142 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -51,3 +51,4 @@ linphone.spec
|
||||||
|
|
||||||
# VSCode
|
# VSCode
|
||||||
linphone60*.log
|
linphone60*.log
|
||||||
|
linphone61*.log
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ RowLayout {
|
||||||
property var propertyOwnerGui
|
property var propertyOwnerGui
|
||||||
property bool enabled: true
|
property bool enabled: true
|
||||||
spacing : 20 * DefaultStyle.dp
|
spacing : 20 * DefaultStyle.dp
|
||||||
Layout.minimumHeight: 32 * DefaultStyle.dp
|
|
||||||
signal checkedChanged(bool checked)
|
signal checkedChanged(bool checked)
|
||||||
|
|
||||||
function setChecked(value) {
|
function setChecked(value) {
|
||||||
|
|
@ -20,6 +19,8 @@ RowLayout {
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
|
Layout.minimumHeight: 32 * DefaultStyle.dp
|
||||||
|
spacing: 4 * DefaultStyle.dp
|
||||||
Text {
|
Text {
|
||||||
text: titleText
|
text: titleText
|
||||||
font: Typography.p2l
|
font: Typography.p2l
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ Rectangle {
|
||||||
property var model
|
property var model
|
||||||
color: DefaultStyle.grey_0
|
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: contentListView.contentHeight
|
||||||
property int minimumWidthForSwitchintToRowLayout: 981 * DefaultStyle.dp
|
property int minimumWidthForSwitchintToRowLayout: 981 * DefaultStyle.dp
|
||||||
property var useVerticalLayout
|
property var useVerticalLayout
|
||||||
property bool saveButtonVisible: true
|
property bool saveButtonVisible: true
|
||||||
|
|
@ -34,12 +34,10 @@ Rectangle {
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
setResponsivityFlags()
|
setResponsivityFlags()
|
||||||
}
|
}
|
||||||
ColumnLayout {
|
|
||||||
spacing: 0
|
|
||||||
anchors.fill: parent
|
|
||||||
Control.Control {
|
Control.Control {
|
||||||
id: header
|
id: header
|
||||||
Layout.fillWidth: 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
|
||||||
z: 1
|
z: 1
|
||||||
|
|
@ -99,14 +97,19 @@ Rectangle {
|
||||||
}
|
}
|
||||||
Control.ScrollView {
|
Control.ScrollView {
|
||||||
id: scrollView
|
id: scrollView
|
||||||
Layout.topMargin: 16 * DefaultStyle.dp
|
anchors.left: parent.left
|
||||||
Layout.fillWidth: true
|
anchors.right: parent.right
|
||||||
Layout.fillHeight: true
|
anchors.bottom: parent.bottom
|
||||||
leftPadding: 45 * DefaultStyle.dp
|
anchors.top: header.bottom
|
||||||
rightPadding: 45 * DefaultStyle.dp
|
anchors.topMargin: 16 * DefaultStyle.dp
|
||||||
|
// Workaround while the CI is made with Qt6.5.3
|
||||||
|
// When updated to 6.8, remove this Item and
|
||||||
|
// change the ScrollView with a Flickable
|
||||||
|
Item{anchors.fill: parent}
|
||||||
|
contentHeight: contentListView.contentHeight
|
||||||
Control.ScrollBar.vertical: ScrollBar {
|
Control.ScrollBar.vertical: ScrollBar {
|
||||||
active: scrollViewContent.implicitHeight > scrollView.height
|
active: contentListView.contentHeight > scrollView.height
|
||||||
visible: scrollViewContent.implicitHeight > scrollView.height
|
visible: contentListView.contentHeight > scrollView.height
|
||||||
interactive: true
|
interactive: true
|
||||||
policy: Control.ScrollBar.AsNeeded
|
policy: Control.ScrollBar.AsNeeded
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
|
|
@ -117,14 +120,18 @@ Rectangle {
|
||||||
Control.ScrollBar.horizontal: ScrollBar {
|
Control.ScrollBar.horizontal: ScrollBar {
|
||||||
active: false
|
active: false
|
||||||
}
|
}
|
||||||
ColumnLayout {
|
ListView {
|
||||||
id: scrollViewContent
|
id: contentListView
|
||||||
width: scrollView.width - scrollView.leftPadding - scrollView.rightPadding
|
|
||||||
spacing: 10 * DefaultStyle.dp
|
|
||||||
Repeater {
|
|
||||||
id: contentRepeater
|
|
||||||
model: mainItem.contentModel
|
model: mainItem.contentModel
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.leftMargin: 45 * DefaultStyle.dp
|
||||||
|
anchors.rightMargin: 45 * DefaultStyle.dp
|
||||||
|
height: contentHeight
|
||||||
|
spacing: 10 * DefaultStyle.dp
|
||||||
delegate: ColumnLayout {
|
delegate: ColumnLayout {
|
||||||
|
spacing: 16 * DefaultStyle.dp
|
||||||
|
width: contentListView.width
|
||||||
Rectangle {
|
Rectangle {
|
||||||
visible: index !== 0
|
visible: index !== 0
|
||||||
Layout.topMargin: (modelData.hideTopSeparator ? 0 : 16) * DefaultStyle.dp
|
Layout.topMargin: (modelData.hideTopSeparator ? 0 : 16) * DefaultStyle.dp
|
||||||
|
|
@ -137,7 +144,7 @@ Rectangle {
|
||||||
rows: 1
|
rows: 1
|
||||||
columns: mainItem.useVerticalLayout ? 1 : 2
|
columns: mainItem.useVerticalLayout ? 1 : 2
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredWidth: parent.width
|
// Layout.preferredWidth: parent.width
|
||||||
rowSpacing: (modelData.title.length > 0 || modelData.subTitle.length > 0 ? 20 : 0) * DefaultStyle.dp
|
rowSpacing: (modelData.title.length > 0 || modelData.subTitle.length > 0 ? 20 : 0) * DefaultStyle.dp
|
||||||
columnSpacing: 47 * DefaultStyle.dp
|
columnSpacing: 47 * DefaultStyle.dp
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
|
|
@ -171,6 +178,7 @@ Rectangle {
|
||||||
Layout.preferredWidth: (modelData.customWidth > 0 ? modelData.customWidth : 545) * DefaultStyle.dp
|
Layout.preferredWidth: (modelData.customWidth > 0 ? modelData.customWidth : 545) * DefaultStyle.dp
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
Loader {
|
Loader {
|
||||||
|
id: contentLoader
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
sourceComponent: modelData.contentComponent
|
sourceComponent: modelData.contentComponent
|
||||||
}
|
}
|
||||||
|
|
@ -182,7 +190,5 @@ Rectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue