2019-07-13 05:39:01 -04:00
|
|
|
import QtQuick 2.12
|
2019-12-13 08:32:18 -04:00
|
|
|
import QtQuick.Controls 2.12
|
2019-07-13 05:39:01 -04:00
|
|
|
import QtQuick.Layouts 1.12
|
2019-05-12 13:17:42 -04:00
|
|
|
import "../../Base"
|
|
|
|
|
2019-12-09 05:25:31 -04:00
|
|
|
HDrawer {
|
2019-12-10 14:57:54 -04:00
|
|
|
id: roomPane
|
2019-12-10 16:29:49 -04:00
|
|
|
saveName: "roomPane"
|
|
|
|
|
2019-12-09 05:25:31 -04:00
|
|
|
edge: Qt.RightEdge
|
2019-12-10 14:46:05 -04:00
|
|
|
defaultSize: buttonRepeater.childrenImplicitWidth
|
2019-12-10 14:19:25 -04:00
|
|
|
minimumSize:
|
2019-12-09 05:25:31 -04:00
|
|
|
buttonRepeater.count > 0 ? buttonRepeater.itemAt(0).implicitWidth : 0
|
2019-05-12 13:17:42 -04:00
|
|
|
|
2019-12-09 11:46:41 -04:00
|
|
|
background: HColumnLayout{
|
|
|
|
Rectangle {
|
2019-12-10 14:57:54 -04:00
|
|
|
color: theme.chat.roomPaneButtons.background
|
2019-12-09 11:46:41 -04:00
|
|
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.preferredHeight: theme.baseElementsHeight
|
|
|
|
}
|
|
|
|
|
|
|
|
Rectangle {
|
2019-12-10 14:57:54 -04:00
|
|
|
color: theme.chat.roomPane.background
|
2019-12-09 11:46:41 -04:00
|
|
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.fillHeight: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-12-09 05:25:31 -04:00
|
|
|
HColumnLayout {
|
|
|
|
anchors.fill: parent
|
2019-07-12 18:15:06 -04:00
|
|
|
|
2019-12-09 05:25:31 -04:00
|
|
|
HFlow {
|
2019-12-15 13:04:51 -04:00
|
|
|
populate: null
|
|
|
|
|
2019-12-09 05:25:31 -04:00
|
|
|
Layout.fillWidth: true
|
2019-07-12 18:15:06 -04:00
|
|
|
|
2019-12-09 05:25:31 -04:00
|
|
|
HRepeater {
|
|
|
|
id: buttonRepeater
|
|
|
|
model: [
|
|
|
|
"members", "files", "notifications", "history", "settings"
|
|
|
|
]
|
|
|
|
|
|
|
|
HButton {
|
|
|
|
height: theme.baseElementsHeight
|
|
|
|
backgroundColor: "transparent"
|
|
|
|
icon.name: "room-view-" + modelData
|
|
|
|
toolTip.text: qsTr(
|
|
|
|
modelData.charAt(0).toUpperCase() + modelData.slice(1)
|
|
|
|
)
|
2019-12-13 08:32:18 -04:00
|
|
|
|
|
|
|
autoExclusive: true
|
2019-12-13 18:01:46 -04:00
|
|
|
checked: swipeView.currentIndex === 0 && index === 0 ||
|
|
|
|
swipeView.currentIndex === 1 && index === 4
|
|
|
|
|
2019-12-13 08:32:18 -04:00
|
|
|
enabled: ["members", "settings"].includes(modelData)
|
|
|
|
|
2019-12-15 15:23:15 -04:00
|
|
|
onClicked: swipeView.currentIndex = Math.min(index, 1)
|
2019-12-09 05:25:31 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-12-13 17:19:47 -04:00
|
|
|
HSwipeView {
|
2019-12-13 08:32:18 -04:00
|
|
|
id: swipeView
|
2019-12-13 17:19:47 -04:00
|
|
|
clip: true
|
2019-12-13 08:32:18 -04:00
|
|
|
interactive: ! roomPane.collapsed
|
2019-12-13 17:19:47 -04:00
|
|
|
|
|
|
|
saveName: "roomPaneView"
|
|
|
|
saveId: chat.roomId
|
2019-12-13 08:32:18 -04:00
|
|
|
|
2019-12-09 05:25:31 -04:00
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.fillHeight: true
|
2019-12-13 08:32:18 -04:00
|
|
|
|
|
|
|
MemberView {}
|
2019-12-13 10:14:54 -04:00
|
|
|
SettingsView { fillAvailableHeight: true }
|
2019-12-09 05:25:31 -04:00
|
|
|
}
|
2019-05-12 13:17:42 -04:00
|
|
|
}
|
|
|
|
}
|