Spectral/qml/Room.qml

61 lines
1.3 KiB
QML
Raw Normal View History

2018-07-12 01:44:41 +00:00
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
2018-09-10 07:01:01 +00:00
import QtQuick.Controls.Material 2.2
import Spectral 0.1
import Spectral.Settings 0.1
2018-03-05 11:11:55 +00:00
import "form"
2018-02-23 14:39:14 +00:00
Page {
property alias connection: roomListModel.connection
2018-02-28 09:10:42 +00:00
id: page
RoomListModel {
id: roomListModel
2018-07-19 05:54:59 +00:00
2018-09-17 12:47:09 +00:00
onRoomAdded: room.getPreviousContent(20)
onNewMessage: if (!window.active) spectralController.showMessage(roomName, content, icon)
2018-02-23 14:39:14 +00:00
}
2018-09-02 13:26:42 +00:00
Rectangle {
2018-02-23 14:39:14 +00:00
anchors.fill: parent
2018-09-02 23:13:39 +00:00
color: MSettings.darkTheme ? "#323232" : "#f3f3f3"
2018-09-02 13:26:42 +00:00
RowLayout {
anchors.fill: parent
2018-09-02 13:26:42 +00:00
spacing: 0
RoomListForm {
Layout.fillHeight: true
Layout.preferredWidth: MSettings.miniMode ? 64 : page.width * 0.35
Layout.minimumWidth: 64
Layout.maximumWidth: 360
2018-09-04 13:13:14 +00:00
id: roomListForm
2018-09-02 13:26:42 +00:00
listModel: roomListModel
}
2018-09-02 23:13:39 +00:00
Rectangle {
Layout.preferredWidth: 1
Layout.fillHeight: true
2018-09-04 13:13:14 +00:00
2018-09-02 23:13:39 +00:00
color: MSettings.darkTheme ? "#363636" : "#ececec"
}
2018-09-02 13:26:42 +00:00
RoomForm {
Layout.fillWidth: true
Layout.fillHeight: true
2018-09-04 13:13:14 +00:00
id: roomForm
2018-09-02 13:26:42 +00:00
currentRoom: roomListForm.enteredRoom
}
}
2018-02-23 14:39:14 +00:00
}
}