diff --git a/framework/qml/qml/DevConsole.qml b/framework/qml/qml/DevConsole.qml index aa8fb72..b42c13b 100644 --- a/framework/qml/qml/DevConsole.qml +++ b/framework/qml/qml/DevConsole.qml @@ -1,3 +1,5 @@ +pragma ComponentBehavior: Bound + import QtQuick import QtQuick.Controls import QtQuick.Layouts @@ -27,7 +29,7 @@ Rectangle { ListModel { id: lineModel } function append(line) { - lineModel.append({ "text": line }); + lineModel.append({ "line":line }); while (lineModel.count > maxLines) { lineModel.remove(0); } @@ -40,7 +42,7 @@ Rectangle { lineModel.clear(); const tail = BackendConnection.childLogTail(); for (let i = 0; i < tail.length; ++i) { - lineModel.append({ "text": tail[i] }); + lineModel.append({ "line":tail[i] }); } if (autoScroll.checked) { view.positionViewAtEnd(); @@ -114,8 +116,10 @@ Rectangle { ScrollBar.vertical: ScrollBar { policy: ScrollBar.AsNeeded } delegate: Label { + required property string line + width: view.width - text: model.text + text: line color: "#d6dee7" font.family: "monospace" font.pixelSize: 11