mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 15:59:02 +08:00
Use UM Dialog for EngineLog dialog
This commit is contained in:
parent
5917596ad7
commit
2b2c624e4e
@ -1,35 +1,20 @@
|
|||||||
import QtQuick 2.2
|
import QtQuick 2.2
|
||||||
import QtQuick.Window 2.1
|
|
||||||
import QtQuick.Controls 1.1
|
import QtQuick.Controls 1.1
|
||||||
import QtQuick.Layouts 1.1
|
import QtQuick.Layouts 1.1
|
||||||
|
|
||||||
import UM 1.0 as UM
|
import UM 1.0 as UM
|
||||||
|
|
||||||
Window {
|
UM.Dialog {
|
||||||
id: dialog
|
id: dialog;
|
||||||
|
|
||||||
title: qsTr("Cura Engine Log");
|
//: Engine Log dialog title
|
||||||
|
title: qsTr("Engine Log");
|
||||||
|
|
||||||
modality: Qt.NonModal;
|
modality: Qt.NonModal;
|
||||||
flags: Qt.Dialog;
|
|
||||||
|
|
||||||
width: 640;
|
|
||||||
height: 480;
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
anchors.fill: parent;
|
|
||||||
color: UM.Theme.colors.system_window;
|
|
||||||
|
|
||||||
ColumnLayout {
|
|
||||||
anchors.fill: parent;
|
|
||||||
anchors.margins: UM.Theme.sizes.default_margin.width;
|
|
||||||
|
|
||||||
TextArea {
|
TextArea {
|
||||||
id: textArea
|
id: textArea
|
||||||
|
anchors.fill: parent;
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.fillHeight: true
|
|
||||||
}
|
|
||||||
|
|
||||||
Timer {
|
Timer {
|
||||||
id: updateTimer;
|
id: updateTimer;
|
||||||
@ -38,18 +23,12 @@ Window {
|
|||||||
repeat: true;
|
repeat: true;
|
||||||
onTriggered: textArea.text = Printer.getEngineLog();
|
onTriggered: textArea.text = Printer.getEngineLog();
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
Item {
|
|
||||||
Layout.fillWidth: true;
|
|
||||||
}
|
}
|
||||||
Button {
|
|
||||||
|
rightButtons: Button {
|
||||||
text: qsTr("Close");
|
text: qsTr("Close");
|
||||||
onClicked: dialog.visible = false;
|
onClicked: dialog.visible = false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
onVisibleChanged: {
|
onVisibleChanged: {
|
||||||
if(visible) {
|
if(visible) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user