add console listview

This commit is contained in:
2026-11-15 14:39:33 +03:00
parent 17f29bf14c
commit 536dda5332
4 changed files with 39 additions and 23 deletions

34
qml/lists/ConsoleList.qml Normal file
View File

@@ -0,0 +1,34 @@
pragma ComponentBehavior: Bound
import QtQuick
import QtQuick.Controls
import archpack
ListView {
id: root
clip: true
spacing: 2
model: consoleLogData
onModelChanged: positionViewAtEnd()
onCountChanged: positionViewAtEnd()
property var consoleLogData: ""
ScrollBar.vertical: ScrollBar {
policy: ScrollBar.AsNeeded
width: 6
}
delegate: Text {
width: root.width
text: modelData
color: Theme.color3
font.family: "monospace"
font.pixelSize: 11
wrapMode: Text.WrapAnywhere
// из-зa предупреждение qmllint
required property var modelData
}
}

View File

@@ -32,7 +32,7 @@ Item {
radius: 7
color: modelData.updating ? "#313244" : "transparent"
// из-зи предупреждение qmllint
// из-зa предупреждение qmllint
required property var modelData
Behavior on color { ColorAnimation { duration: 300 } }