From 80734944d341e7669d98e55ed2dc7a4516daff91 Mon Sep 17 00:00:00 2001 From: James Graham Date: Thu, 22 Aug 2024 19:34:31 +0000 Subject: [PATCH] Use sections for power levels in the user list Closes network/neochat#654 --- src/qml/RoomInformation.qml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/qml/RoomInformation.qml b/src/qml/RoomInformation.qml index 653dc5557..c5b9a0c69 100644 --- a/src/qml/RoomInformation.qml +++ b/src/qml/RoomInformation.qml @@ -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 - } } } }