fixes for empty view

This commit is contained in:
Iuri Matias 2020-09-23 13:42:15 -04:00
parent 2204a7b785
commit 6ac3f86951
1 changed files with 16 additions and 11 deletions

View File

@ -178,6 +178,11 @@ import "../../../../imports"
// return totalHeight + Style.current.padding
// }
Item {
anchors.top: suggestionsText.bottom
anchors.topMargin: Style.current.smallPadding
width: parent.width
Repeater {
id: sectionRepeater
anchors.top: suggestionsText.bottom
@ -185,21 +190,21 @@ import "../../../../imports"
// id: sview
model: ChannelJSON.categories
Item {
anchors.top: index === 0 ? suggestionsText.bottom : parent.children[index - 1].bottom
anchors.top: index === 0 ? parent.top : parent.children[index - 1].bottom
anchors.topMargin: index === 0 ? 0 : Style.current.padding
width: parent.width - Style.current.padding
// height: {
// return childrenRect.height
// }
height: {
var totalHeight = 0
for (let i = 0; i < channelRepeater.count; i++) {
totalHeight += channelRepeater.itemAt(i).height + Style.current.padding
}
return totalHeight
return childrenRect.height
}
// height: {
// var totalHeight = 0
// for (let i = 0; i < channelRepeater.count; i++) {
// totalHeight += channelRepeater.itemAt(i).height + Style.current.padding
// }
// return totalHeight
// }
Text {
id: sectionTitle
text: modelData.name
@ -224,7 +229,7 @@ import "../../../../imports"
}
// }
}
// Flow {
// id: channelFlow
// Layout.fillHeight: false