status-desktop/ui/app/AppLayouts/Chat/components/SuggestedChannels.qml

46 lines
1.1 KiB
QML
Raw Normal View History

import QtQuick 2.13
import QtQuick.Controls 2.13
import QtQuick.Layouts 1.13
import utils 1.0
import "../../../../shared"
import "../../../../shared/panels"
import "../data/channelList.js" as ChannelJSON
import "./"
Repeater {
id: sectionRepeater
model: ChannelJSON.categories
Item {
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
2020-09-23 19:11:27 +00:00
height: childrenRect.height
2020-09-23 21:11:57 +00:00
StyledText {
id: sectionTitle
text: modelData.name
font.bold: true
font.pixelSize: 16
}
Flow {
anchors.top: sectionTitle.bottom
anchors.topMargin: Style.current.smallPadding
Layout.fillHeight: true
Layout.fillWidth: true
width: parent.width
spacing: 10
Repeater {
model: modelData.channels
SuggestedChannel { channel: modelData }
}
}
}
}
/*##^##
Designer {
D{i:0;autoSize:true;height:480;width:640}
}
##^##*/