From 2b2c624e4e6be5e5570ad8ca049941df3f722839 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Wed, 29 Apr 2015 17:39:09 +0200 Subject: [PATCH] Use UM Dialog for EngineLog dialog --- qml/EngineLog.qml | 55 +++++++++++++++-------------------------------- 1 file changed, 17 insertions(+), 38 deletions(-) diff --git a/qml/EngineLog.qml b/qml/EngineLog.qml index 2e60edcebf..8b11641694 100644 --- a/qml/EngineLog.qml +++ b/qml/EngineLog.qml @@ -1,56 +1,35 @@ import QtQuick 2.2 -import QtQuick.Window 2.1 import QtQuick.Controls 1.1 import QtQuick.Layouts 1.1 import UM 1.0 as UM -Window { - id: dialog +UM.Dialog { + id: dialog; - title: qsTr("Cura Engine Log"); + //: Engine Log dialog title + title: qsTr("Engine Log"); modality: Qt.NonModal; - flags: Qt.Dialog; - width: 640; - height: 480; - - Rectangle { + TextArea { + id: textArea anchors.fill: parent; - color: UM.Theme.colors.system_window; - ColumnLayout { - anchors.fill: parent; - anchors.margins: UM.Theme.sizes.default_margin.width; - - 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; - } - } + Timer { + id: updateTimer; + interval: 1000; + running: false; + repeat: true; + onTriggered: textArea.text = Printer.getEngineLog(); } } + rightButtons: Button { + text: qsTr("Close"); + onClicked: dialog.visible = false; + } + onVisibleChanged: { if(visible) { textArea.text = Printer.getEngineLog();