mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 08:26:07 +08:00
Fix the engine log window after changing it to use Window instead of Dialog
This commit is contained in:
parent
61de130880
commit
6d0e31aa8d
@ -3,22 +3,52 @@ 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
|
||||||
|
|
||||||
Window {
|
Window {
|
||||||
id: dialog
|
id: dialog
|
||||||
|
|
||||||
title: qsTr("Cura Engine Log");
|
title: qsTr("Cura Engine Log");
|
||||||
|
|
||||||
modality: Qt.NonModal;
|
modality: Qt.NonModal;
|
||||||
|
flags: Qt.Dialog;
|
||||||
|
|
||||||
width: 640;
|
width: 640;
|
||||||
|
height: 480;
|
||||||
|
|
||||||
TextArea {
|
Rectangle {
|
||||||
id: textArea
|
anchors.fill: parent;
|
||||||
|
color: UM.Theme.colors.system_window;
|
||||||
|
|
||||||
anchors.left: parent.left;
|
ColumnLayout {
|
||||||
anchors.right: parent.right;
|
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: {
|
onVisibleChanged: {
|
||||||
@ -29,12 +59,4 @@ Window {
|
|||||||
updateTimer.stop();
|
updateTimer.stop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Timer {
|
|
||||||
id: updateTimer;
|
|
||||||
interval: 1000;
|
|
||||||
running: false;
|
|
||||||
repeat: true;
|
|
||||||
onTriggered: textArea.text = Printer.getEngineLog();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -301,7 +301,7 @@ UM.MainWindow {
|
|||||||
|
|
||||||
documentation.onTriggered: Qt.openUrlExternally("https://ultimaker.com/en/support");
|
documentation.onTriggered: Qt.openUrlExternally("https://ultimaker.com/en/support");
|
||||||
reportBug.onTriggered: Qt.openUrlExternally("https://github.com/Ultimaker/PluggableCura/issues");
|
reportBug.onTriggered: Qt.openUrlExternally("https://github.com/Ultimaker/PluggableCura/issues");
|
||||||
showEngineLog.onTriggered: engineLog.open();
|
showEngineLog.onTriggered: engineLog.visible = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Menu {
|
Menu {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user