moment/harmonyqml/UI.qml
miruka cccc43a9ae Reorganize sidePane, accounts and rooms
- Accordion design for accounts and rooms (not finished)
- Toolbar and account/room lists reduce correctly, buttons become
  hamburger menu if not enough width
- Can set status using the "Set status message" account fields
- Uniformized avatar sizes for sidePane, roomHeader and SendBox
2019-03-26 03:19:55 -04:00

38 lines
929 B
QML

import QtQuick.Controls 1.4 as Controls1
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.4
//https://doc.qt.io/qt-5/qml-qtquick-controls-splitview.html
Controls1.SplitView {
anchors.fill: parent
SidePane {
Layout.minimumWidth: 36
width: 200
}
StackView {
function show_page(componentName) {
pageStack.replace(componentName + ".qml")
}
function show_room(user_obj, room_obj) {
pageStack.replace(
"ChatPage.qml", { user: user_obj, room: room_obj }
)
}
id: "pageStack"
initialItem: ChatPage {
user: Backend.accountsModel.get(0)
room: Backend.roomsModel[Backend.accountsModel.get(0).user_id].get(0)
}
onCurrentItemChanged: currentItem.forceActiveFocus()
// Buggy
replaceExit: null
popExit: null
pushExit: null
}
}