2018-12-07 01:18:42 +00:00
|
|
|
import QtQuick 2.12
|
2018-12-22 14:25:03 +00:00
|
|
|
import QtQuick.Controls 2.12
|
|
|
|
import QtQuick.Layouts 1.12
|
|
|
|
import QtQuick.Controls.Material 2.12
|
2018-10-02 02:07:47 +00:00
|
|
|
|
|
|
|
import Spectral 0.1
|
2018-11-16 12:30:42 +00:00
|
|
|
import Spectral.Effect 2.0
|
2018-12-03 11:55:42 +00:00
|
|
|
import Spectral.Component 2.0
|
2018-12-16 02:47:58 +00:00
|
|
|
import Spectral.Setting 0.1
|
2018-10-02 02:07:47 +00:00
|
|
|
|
2018-11-17 12:52:17 +00:00
|
|
|
Control {
|
2018-10-02 02:07:47 +00:00
|
|
|
signal clicked()
|
|
|
|
|
|
|
|
id: header
|
|
|
|
|
2018-11-17 12:52:17 +00:00
|
|
|
background: Rectangle {
|
2019-05-08 13:15:09 +00:00
|
|
|
color: MPalette.background
|
2018-11-17 12:52:17 +00:00
|
|
|
|
|
|
|
layer.enabled: true
|
|
|
|
layer.effect: ElevationEffect {
|
|
|
|
elevation: 2
|
|
|
|
}
|
2018-11-16 12:30:42 +00:00
|
|
|
}
|
2018-10-02 02:07:47 +00:00
|
|
|
|
2018-11-17 12:52:17 +00:00
|
|
|
RowLayout {
|
2018-10-02 02:07:47 +00:00
|
|
|
anchors.fill: parent
|
2019-05-08 13:15:09 +00:00
|
|
|
anchors.leftMargin: 18
|
2018-10-02 02:07:47 +00:00
|
|
|
|
2019-05-08 13:15:09 +00:00
|
|
|
Layout.alignment: Qt.AlignVCenter
|
2018-10-02 02:07:47 +00:00
|
|
|
|
2019-05-08 13:15:09 +00:00
|
|
|
spacing: 12
|
2018-10-02 02:07:47 +00:00
|
|
|
|
2019-05-08 13:15:09 +00:00
|
|
|
Label {
|
|
|
|
Layout.fillWidth: true
|
2018-10-02 02:07:47 +00:00
|
|
|
|
2019-05-08 13:15:09 +00:00
|
|
|
text: currentRoom ? currentRoom.displayName : ""
|
|
|
|
color: MPalette.foreground
|
|
|
|
font.pixelSize: 18
|
|
|
|
elide: Text.ElideRight
|
|
|
|
wrapMode: Text.NoWrap
|
2018-11-17 12:52:17 +00:00
|
|
|
}
|
2018-10-02 02:07:47 +00:00
|
|
|
|
2019-05-08 13:15:09 +00:00
|
|
|
ToolButton {
|
|
|
|
Layout.preferredWidth: height
|
2018-11-17 12:52:17 +00:00
|
|
|
Layout.fillHeight: true
|
2018-10-02 02:07:47 +00:00
|
|
|
|
2019-05-08 13:15:09 +00:00
|
|
|
contentItem: MaterialIcon {
|
|
|
|
icon: "\ue5d4"
|
2018-12-16 02:47:58 +00:00
|
|
|
color: MPalette.lighter
|
2018-10-02 02:07:47 +00:00
|
|
|
}
|
2018-11-17 12:52:17 +00:00
|
|
|
|
2019-05-08 13:15:09 +00:00
|
|
|
onClicked: header.clicked()
|
|
|
|
}
|
2018-11-17 12:52:17 +00:00
|
|
|
}
|
2018-10-02 02:07:47 +00:00
|
|
|
}
|