100 lines
2.0 KiB
QML
100 lines
2.0 KiB
QML
import QtQuick
|
|
import QtQuick.Layouts
|
|
|
|
Rectangle {
|
|
id: root
|
|
anchors.left: parent.left
|
|
anchors.right: parent.right
|
|
// anchors.bottom: consoleBar.top
|
|
visible: height > 0
|
|
clip: true
|
|
color: "#1e1e2e"
|
|
z: 40
|
|
|
|
property string title: ""
|
|
|
|
Behavior on height { NumberAnimation { duration: 250; easing.type: Easing.InOutQuad } }
|
|
Behavior on opacity { NumberAnimation { duration: 180 } }
|
|
|
|
MouseArea {
|
|
anchors.fill: parent
|
|
}
|
|
|
|
Rectangle {
|
|
anchors.top: parent.top
|
|
anchors.left: parent.left
|
|
anchors.right: parent.right
|
|
height: 1
|
|
color: "#313244"
|
|
}
|
|
|
|
ColumnLayout {
|
|
anchors.fill: parent
|
|
anchors.margins: 12
|
|
spacing: 8
|
|
|
|
RowLayout {
|
|
Layout.fillWidth: true
|
|
spacing: 6
|
|
|
|
Text {
|
|
text: root.title
|
|
color: "#cdd6f4"
|
|
font.pixelSize: 13
|
|
font.bold: true
|
|
}
|
|
|
|
Item { Layout.fillWidth: true }
|
|
|
|
Text {
|
|
text: "root.consoleStatus"
|
|
color: "#f9e2af"
|
|
font.pixelSize: 11
|
|
}
|
|
}
|
|
|
|
Rectangle {
|
|
Layout.fillWidth: true
|
|
height: 1
|
|
color: "#313244"
|
|
}
|
|
|
|
Item {
|
|
Layout.fillWidth: true
|
|
Layout.fillHeight: true
|
|
|
|
// ListView {
|
|
// id: logView
|
|
// anchors.fill: parent
|
|
// clip: true
|
|
// model: root.consoleLog
|
|
// onModelChanged: positionViewAtEnd()
|
|
// spacing: 2
|
|
// onCountChanged: positionViewAtEnd()
|
|
//
|
|
// ScrollBar.vertical: ScrollBar {
|
|
// policy: ScrollBar.AsNeeded
|
|
// width: 6
|
|
// }
|
|
//
|
|
// delegate: Text {
|
|
// width: logView.width
|
|
// text: modelData
|
|
// color: "#a6adc8"
|
|
// font.family: "monospace"
|
|
// font.pixelSize: 11
|
|
// wrapMode: Text.WrapAnywhere
|
|
// }
|
|
// }
|
|
//
|
|
// Text {
|
|
// anchors.centerIn: parent
|
|
// text: root.consolePlaceholder
|
|
// color: "#585b70"
|
|
// font.pixelSize: 12
|
|
// visible: root.consoleLog.length === 0
|
|
// }
|
|
}
|
|
}
|
|
}
|