add console impl close/open
This commit is contained in:
@@ -7,47 +7,50 @@ Rectangle {
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
height: 26
|
||||
color: barMouse.containsMouse ? "#313244" : "#1e1e2e"
|
||||
color: mouseArea.containsMouse ? Theme.color9 : Theme.color8
|
||||
z: 50
|
||||
|
||||
property string title: ""
|
||||
property string status: ""
|
||||
property bool consoleOpen: false
|
||||
|
||||
signal toggled()
|
||||
|
||||
Rectangle {
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
height: 1
|
||||
color: "#313244"
|
||||
color: Theme.color5
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: 12
|
||||
anchors.rightMargin: 12
|
||||
spacing: 8
|
||||
anchors.leftMargin: Theme.baseMargins
|
||||
anchors.rightMargin: Theme.baseMargins
|
||||
spacing: Theme.baseSpacing
|
||||
|
||||
Text {
|
||||
text: root.consoleOpen ? "▼ Скрыть консоль" : "▲ " + root.title
|
||||
color: "#a6adc8"
|
||||
color: Theme.color3
|
||||
font.pixelSize: 11
|
||||
}
|
||||
|
||||
Item { Layout.fillWidth: true }
|
||||
|
||||
Text {
|
||||
text: "root.consoleStatus"
|
||||
color: "#f9e2af"
|
||||
text: root.status
|
||||
color: Theme.color7
|
||||
font.pixelSize: 11
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: barMouse
|
||||
id: mouseArea
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
// onClicked: root.consoleOpen = !root.consoleOpen
|
||||
onClicked: root.toggled()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user