Refactor Chat/RoomSidePane
This commit is contained in:
@@ -4,7 +4,6 @@ import "../../utils.js" as Utils
|
||||
|
||||
HTileDelegate {
|
||||
id: memberDelegate
|
||||
spacing: roomSidePane.currentSpacing
|
||||
backgroundColor: theme.chat.roomSidePane.member.background
|
||||
|
||||
image: HUserAvatar {
|
||||
|
@@ -13,7 +13,7 @@ HColumnLayout {
|
||||
|
||||
|
||||
readonly property var originSource:
|
||||
modelSources[["Member", chatPage.roomId]] || []
|
||||
modelSources[["Member", chat.roomId]] || []
|
||||
|
||||
|
||||
onOriginSourceChanged: filterLimiter.restart()
|
||||
|
@@ -2,17 +2,43 @@ import QtQuick 2.12
|
||||
import QtQuick.Layouts 1.12
|
||||
import "../../Base"
|
||||
|
||||
Rectangle {
|
||||
HDrawer {
|
||||
id: roomSidePane
|
||||
color: theme.chat.roomSidePane.background
|
||||
edge: Qt.RightEdge
|
||||
normalWidth: buttonRepeater.childrenImplicitWidth
|
||||
minNormalWidth:
|
||||
buttonRepeater.count > 0 ? buttonRepeater.itemAt(0).implicitWidth : 0
|
||||
|
||||
property bool collapsed: false
|
||||
property var activeView: null
|
||||
property int currentSpacing: collapsed ? 0 : theme.spacing
|
||||
|
||||
Behavior on currentSpacing { HNumberAnimation {} }
|
||||
|
||||
MembersView {
|
||||
HColumnLayout {
|
||||
anchors.fill: parent
|
||||
|
||||
HFlow {
|
||||
Layout.fillWidth: true
|
||||
|
||||
HRepeater {
|
||||
id: buttonRepeater
|
||||
model: [
|
||||
"members", "files", "notifications", "history", "settings"
|
||||
]
|
||||
|
||||
HButton {
|
||||
height: theme.baseElementsHeight
|
||||
backgroundColor: "transparent"
|
||||
icon.name: "room-view-" + modelData
|
||||
autoExclusive: true
|
||||
checked: modelData === "members"
|
||||
enabled: modelData === "members"
|
||||
toolTip.text: qsTr(
|
||||
modelData.charAt(0).toUpperCase() + modelData.slice(1)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MembersView {
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user