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,150 +34,156 @@ Rectangle {
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
setResponsivityFlags()
|
setResponsivityFlags()
|
||||||
}
|
}
|
||||||
ColumnLayout {
|
Control.Control {
|
||||||
spacing: 0
|
id: header
|
||||||
anchors.fill: parent
|
anchors.left: parent.left
|
||||||
Control.Control {
|
anchors.right: parent.right
|
||||||
id: header
|
leftPadding: 45 * DefaultStyle.dp
|
||||||
Layout.fillWidth: true
|
rightPadding: 45 * DefaultStyle.dp
|
||||||
leftPadding: 45 * DefaultStyle.dp
|
z: 1
|
||||||
rightPadding: 45 * DefaultStyle.dp
|
background: Rectangle {
|
||||||
z: 1
|
anchors.fill: parent
|
||||||
background: Rectangle {
|
color: DefaultStyle.grey_0
|
||||||
anchors.fill: parent
|
}
|
||||||
color: DefaultStyle.grey_0
|
contentItem: ColumnLayout {
|
||||||
|
RowLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.topMargin: 20 * DefaultStyle.dp
|
||||||
|
spacing: 5 * DefaultStyle.dp
|
||||||
|
Layout.bottomMargin: 10 * DefaultStyle.dp
|
||||||
|
Button {
|
||||||
|
id: backButton
|
||||||
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||||
|
icon.source: AppIcons.leftArrow
|
||||||
|
focus: true
|
||||||
|
visible: mainItem.container.depth > 1
|
||||||
|
Layout.rightMargin: 41 * DefaultStyle.dp
|
||||||
|
style: ButtonStyle.noBackground
|
||||||
|
onClicked: {
|
||||||
|
mainItem.container.pop()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Text {
|
||||||
|
text: titleText
|
||||||
|
color: DefaultStyle.main2_600
|
||||||
|
font: Typography.h3
|
||||||
|
}
|
||||||
|
Item {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
Loader {
|
||||||
|
Layout.alignment: Qt.AlignRight
|
||||||
|
sourceComponent: mainItem.topbarOptionalComponent
|
||||||
|
Layout.rightMargin: 34 * DefaultStyle.dp
|
||||||
|
}
|
||||||
|
MediumButton {
|
||||||
|
id: saveButton
|
||||||
|
style: ButtonStyle.main
|
||||||
|
text: qsTr("Enregistrer")
|
||||||
|
Layout.rightMargin: 6 * DefaultStyle.dp
|
||||||
|
visible: mainItem.saveButtonVisible
|
||||||
|
onClicked: {
|
||||||
|
mainItem.save()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
contentItem: ColumnLayout {
|
Rectangle {
|
||||||
RowLayout {
|
Layout.fillWidth: true
|
||||||
Layout.fillWidth: true
|
height: 1 * DefaultStyle.dp
|
||||||
Layout.topMargin: 20 * DefaultStyle.dp
|
color: DefaultStyle.main2_500main
|
||||||
spacing: 5 * DefaultStyle.dp
|
|
||||||
Layout.bottomMargin: 10 * DefaultStyle.dp
|
|
||||||
Button {
|
|
||||||
id: backButton
|
|
||||||
Layout.preferredHeight: 24 * DefaultStyle.dp
|
|
||||||
Layout.preferredWidth: 24 * DefaultStyle.dp
|
|
||||||
icon.source: AppIcons.leftArrow
|
|
||||||
focus: true
|
|
||||||
visible: mainItem.container.depth > 1
|
|
||||||
Layout.rightMargin: 41 * DefaultStyle.dp
|
|
||||||
style: ButtonStyle.noBackground
|
|
||||||
onClicked: {
|
|
||||||
mainItem.container.pop()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Text {
|
|
||||||
text: titleText
|
|
||||||
color: DefaultStyle.main2_600
|
|
||||||
font: Typography.h3
|
|
||||||
}
|
|
||||||
Item {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
}
|
|
||||||
Loader {
|
|
||||||
Layout.alignment: Qt.AlignRight
|
|
||||||
sourceComponent: mainItem.topbarOptionalComponent
|
|
||||||
Layout.rightMargin: 34 * DefaultStyle.dp
|
|
||||||
}
|
|
||||||
MediumButton {
|
|
||||||
id: saveButton
|
|
||||||
style: ButtonStyle.main
|
|
||||||
text: qsTr("Enregistrer")
|
|
||||||
Layout.rightMargin: 6 * DefaultStyle.dp
|
|
||||||
visible: mainItem.saveButtonVisible
|
|
||||||
onClicked: {
|
|
||||||
mainItem.save()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Rectangle {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
height: 1 * DefaultStyle.dp
|
|
||||||
color: DefaultStyle.main2_500main
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Control.ScrollView {
|
}
|
||||||
id: scrollView
|
Control.ScrollView {
|
||||||
Layout.topMargin: 16 * DefaultStyle.dp
|
id: scrollView
|
||||||
Layout.fillWidth: true
|
anchors.left: parent.left
|
||||||
Layout.fillHeight: true
|
anchors.right: parent.right
|
||||||
leftPadding: 45 * DefaultStyle.dp
|
anchors.bottom: parent.bottom
|
||||||
rightPadding: 45 * DefaultStyle.dp
|
anchors.top: header.bottom
|
||||||
Control.ScrollBar.vertical: ScrollBar {
|
anchors.topMargin: 16 * DefaultStyle.dp
|
||||||
active: scrollViewContent.implicitHeight > scrollView.height
|
// Workaround while the CI is made with Qt6.5.3
|
||||||
visible: scrollViewContent.implicitHeight > scrollView.height
|
// When updated to 6.8, remove this Item and
|
||||||
interactive: true
|
// change the ScrollView with a Flickable
|
||||||
policy: Control.ScrollBar.AsNeeded
|
Item{anchors.fill: parent}
|
||||||
anchors.top: parent.top
|
contentHeight: contentListView.contentHeight
|
||||||
anchors.bottom: parent.bottom
|
Control.ScrollBar.vertical: ScrollBar {
|
||||||
anchors.right: parent.right
|
active: contentListView.contentHeight > scrollView.height
|
||||||
anchors.rightMargin: 15 * DefaultStyle.dp
|
visible: contentListView.contentHeight > scrollView.height
|
||||||
}
|
interactive: true
|
||||||
Control.ScrollBar.horizontal: ScrollBar {
|
policy: Control.ScrollBar.AsNeeded
|
||||||
active: false
|
anchors.top: parent.top
|
||||||
}
|
anchors.bottom: parent.bottom
|
||||||
ColumnLayout {
|
anchors.right: parent.right
|
||||||
id: scrollViewContent
|
anchors.rightMargin: 15 * DefaultStyle.dp
|
||||||
width: scrollView.width - scrollView.leftPadding - scrollView.rightPadding
|
}
|
||||||
spacing: 10 * DefaultStyle.dp
|
Control.ScrollBar.horizontal: ScrollBar {
|
||||||
Repeater {
|
active: false
|
||||||
id: contentRepeater
|
}
|
||||||
model: mainItem.contentModel
|
ListView {
|
||||||
delegate: ColumnLayout {
|
id: contentListView
|
||||||
Rectangle {
|
model: mainItem.contentModel
|
||||||
visible: index !== 0
|
anchors.left: parent.left
|
||||||
Layout.topMargin: (modelData.hideTopSeparator ? 0 : 16) * DefaultStyle.dp
|
anchors.right: parent.right
|
||||||
Layout.bottomMargin: 16 * DefaultStyle.dp
|
anchors.leftMargin: 45 * DefaultStyle.dp
|
||||||
Layout.fillWidth: true
|
anchors.rightMargin: 45 * DefaultStyle.dp
|
||||||
height: 1 * DefaultStyle.dp
|
height: contentHeight
|
||||||
color: modelData.hideTopSeparator ? 'transparent' : DefaultStyle.main2_500main
|
spacing: 10 * DefaultStyle.dp
|
||||||
}
|
delegate: ColumnLayout {
|
||||||
GridLayout {
|
spacing: 16 * DefaultStyle.dp
|
||||||
rows: 1
|
width: contentListView.width
|
||||||
columns: mainItem.useVerticalLayout ? 1 : 2
|
Rectangle {
|
||||||
Layout.fillWidth: true
|
visible: index !== 0
|
||||||
|
Layout.topMargin: (modelData.hideTopSeparator ? 0 : 16) * DefaultStyle.dp
|
||||||
|
Layout.bottomMargin: 16 * DefaultStyle.dp
|
||||||
|
Layout.fillWidth: true
|
||||||
|
height: 1 * DefaultStyle.dp
|
||||||
|
color: modelData.hideTopSeparator ? 'transparent' : DefaultStyle.main2_500main
|
||||||
|
}
|
||||||
|
GridLayout {
|
||||||
|
rows: 1
|
||||||
|
columns: mainItem.useVerticalLayout ? 1 : 2
|
||||||
|
Layout.fillWidth: true
|
||||||
|
// Layout.preferredWidth: parent.width
|
||||||
|
rowSpacing: (modelData.title.length > 0 || modelData.subTitle.length > 0 ? 20 : 0) * DefaultStyle.dp
|
||||||
|
columnSpacing: 47 * DefaultStyle.dp
|
||||||
|
ColumnLayout {
|
||||||
|
Layout.preferredWidth: 341 * DefaultStyle.dp
|
||||||
|
Layout.maximumWidth: 341 * DefaultStyle.dp
|
||||||
|
spacing: 3 * DefaultStyle.dp
|
||||||
|
Text {
|
||||||
|
text: modelData.title
|
||||||
|
visible: modelData.title.length > 0
|
||||||
|
font: Typography.h4
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
color: DefaultStyle.main2_600
|
||||||
Layout.preferredWidth: parent.width
|
Layout.preferredWidth: parent.width
|
||||||
rowSpacing: (modelData.title.length > 0 || modelData.subTitle.length > 0 ? 20 : 0) * DefaultStyle.dp
|
}
|
||||||
columnSpacing: 47 * DefaultStyle.dp
|
Text {
|
||||||
ColumnLayout {
|
text: modelData.subTitle
|
||||||
Layout.preferredWidth: 341 * DefaultStyle.dp
|
visible: modelData.subTitle.length > 0
|
||||||
Layout.maximumWidth: 341 * DefaultStyle.dp
|
font: Typography.p1s
|
||||||
spacing: 3 * DefaultStyle.dp
|
wrapMode: Text.WordWrap
|
||||||
Text {
|
color: DefaultStyle.main2_600
|
||||||
text: modelData.title
|
Layout.preferredWidth: parent.width
|
||||||
visible: modelData.title.length > 0
|
}
|
||||||
font: Typography.h4
|
Item {
|
||||||
wrapMode: Text.WordWrap
|
Layout.fillHeight: true
|
||||||
color: DefaultStyle.main2_600
|
}
|
||||||
Layout.preferredWidth: parent.width
|
}
|
||||||
}
|
RowLayout {
|
||||||
Text {
|
Layout.topMargin: (modelData.hideTopMargin ? 0 : (mainItem.useVerticalLayout ? 10 : 21)) * DefaultStyle.dp
|
||||||
text: modelData.subTitle
|
Layout.bottomMargin: 21 * DefaultStyle.dp
|
||||||
visible: modelData.subTitle.length > 0
|
Layout.leftMargin: (mainItem.useVerticalLayout ? 0 : 17) * DefaultStyle.dp
|
||||||
font: Typography.p1s
|
Layout.preferredWidth: (modelData.customWidth > 0 ? modelData.customWidth : 545) * DefaultStyle.dp
|
||||||
wrapMode: Text.WordWrap
|
Layout.alignment: Qt.AlignRight
|
||||||
color: DefaultStyle.main2_600
|
Loader {
|
||||||
Layout.preferredWidth: parent.width
|
id: contentLoader
|
||||||
}
|
Layout.fillWidth: true
|
||||||
Item {
|
sourceComponent: modelData.contentComponent
|
||||||
Layout.fillHeight: true
|
}
|
||||||
}
|
Item {
|
||||||
}
|
Layout.preferredWidth: (modelData.customRightMargin > 0 ? modelData.customRightMargin : 17) * DefaultStyle.dp
|
||||||
RowLayout {
|
|
||||||
Layout.topMargin: (modelData.hideTopMargin ? 0 : (mainItem.useVerticalLayout ? 10 : 21)) * DefaultStyle.dp
|
|
||||||
Layout.bottomMargin: 21 * DefaultStyle.dp
|
|
||||||
Layout.leftMargin: (mainItem.useVerticalLayout ? 0 : 17) * DefaultStyle.dp
|
|
||||||
Layout.preferredWidth: (modelData.customWidth > 0 ? modelData.customWidth : 545) * DefaultStyle.dp
|
|
||||||
Layout.alignment: Qt.AlignRight
|
|
||||||
Loader {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
sourceComponent: modelData.contentComponent
|
|
||||||
}
|
|
||||||
Item {
|
|
||||||
Layout.preferredWidth: (modelData.customRightMargin > 0 ? modelData.customRightMargin : 17) * DefaultStyle.dp
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue