Use sections for power levels in the user list
Closes network/neochat#654
This commit is contained in:
@@ -197,6 +197,14 @@ QQC2.ScrollView {
|
||||
clip: true
|
||||
focus: true
|
||||
|
||||
section.property: "powerLevelString"
|
||||
section.delegate: Kirigami.ListSectionHeader {
|
||||
required property string section
|
||||
|
||||
width: ListView.view.width
|
||||
text: section
|
||||
}
|
||||
|
||||
delegate: Delegates.RoundedItemDelegate {
|
||||
id: userDelegate
|
||||
|
||||
@@ -230,7 +238,6 @@ QQC2.ScrollView {
|
||||
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
|
||||
QQC2.Label {
|
||||
text: userDelegate.name
|
||||
textFormat: Text.PlainText
|
||||
@@ -238,14 +245,6 @@ QQC2.ScrollView {
|
||||
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
QQC2.Label {
|
||||
visible: userDelegate.powerLevel > 0
|
||||
|
||||
text: userDelegate.powerLevelString
|
||||
color: Kirigami.Theme.disabledTextColor
|
||||
textFormat: Text.PlainText
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user