diff --git a/qml/EngineLog.qml b/qml/EngineLog.qml index 6c721a1dab..2e60edcebf 100644 --- a/qml/EngineLog.qml +++ b/qml/EngineLog.qml @@ -3,22 +3,52 @@ import QtQuick.Window 2.1 import QtQuick.Controls 1.1 import QtQuick.Layouts 1.1 +import UM 1.0 as UM + Window { id: dialog title: qsTr("Cura Engine Log"); modality: Qt.NonModal; + flags: Qt.Dialog; width: 640; + height: 480; - TextArea { - id: textArea + Rectangle { + anchors.fill: parent; + color: UM.Theme.colors.system_window; - anchors.left: parent.left; - anchors.right: parent.right; + ColumnLayout { + anchors.fill: parent; + anchors.margins: UM.Theme.sizes.default_margin.width; - implicitHeight: 480; + TextArea { + id: textArea + + Layout.fillWidth: true + Layout.fillHeight: true + } + + Timer { + id: updateTimer; + interval: 1000; + running: false; + repeat: true; + onTriggered: textArea.text = Printer.getEngineLog(); + } + + RowLayout { + Item { + Layout.fillWidth: true; + } + Button { + text: qsTr("Close"); + onClicked: dialog.visible = false; + } + } + } } onVisibleChanged: { @@ -29,12 +59,4 @@ Window { updateTimer.stop(); } } - - Timer { - id: updateTimer; - interval: 1000; - running: false; - repeat: true; - onTriggered: textArea.text = Printer.getEngineLog(); - } } diff --git a/qml/Printer.qml b/qml/Printer.qml index 4c63d50055..df84a14c80 100644 --- a/qml/Printer.qml +++ b/qml/Printer.qml @@ -301,7 +301,7 @@ UM.MainWindow { documentation.onTriggered: Qt.openUrlExternally("https://ultimaker.com/en/support"); reportBug.onTriggered: Qt.openUrlExternally("https://github.com/Ultimaker/PluggableCura/issues"); - showEngineLog.onTriggered: engineLog.open(); + showEngineLog.onTriggered: engineLog.visible = true; } Menu {