Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLipu Fei <lipu.fei815@gmail.com>2018-11-22 17:07:49 +0300
committerLipu Fei <lipu.fei815@gmail.com>2018-11-22 17:07:49 +0300
commit2d2f24251dcaac15bed5bba3e0ec782161743181 (patch)
treeb58a5dce7c6d0ae17f50d9a145e793d07081c83d /plugins/MonitorStage
parentd8c3078d78fc176fc764ee54bd12264850076b3e (diff)
Fix MonitorMainView for USB printing
CURA-5943
Diffstat (limited to 'plugins/MonitorStage')
-rw-r--r--plugins/MonitorStage/MonitorMainView.qml106
1 files changed, 61 insertions, 45 deletions
diff --git a/plugins/MonitorStage/MonitorMainView.qml b/plugins/MonitorStage/MonitorMainView.qml
index c48f6d0aab..57dd033792 100644
--- a/plugins/MonitorStage/MonitorMainView.qml
+++ b/plugins/MonitorStage/MonitorMainView.qml
@@ -1,45 +1,61 @@
-// Copyright (c) 2017 Ultimaker B.V.
-
-import QtQuick 2.2
-import QtQuick.Controls 1.1
-
-import UM 1.3 as UM
-import Cura 1.0 as Cura
-
-Item
-{
- // parent could be undefined as this component is not visible at all times
- width: parent ? parent.width : 0
- height: parent ? parent.height : 0
-
- // We show a nice overlay on the 3D viewer when the current output device has no monitor view
- Rectangle
- {
- id: viewportOverlay
-
- color: UM.Theme.getColor("viewport_overlay")
- width: parent.width
- height: parent.height
-
- MouseArea
- {
- anchors.fill: parent
- acceptedButtons: Qt.AllButtons
- onWheel: wheel.accepted = true
- }
- }
-
- Loader
- {
- id: monitorViewComponent
-
- width: parent.width
- height: parent.height
-
- property real maximumWidth: parent.width
- property real maximumHeight: parent.height
-
- sourceComponent: Cura.MachineManager.printerOutputDevices.length > 0 ? Cura.MachineManager.printerOutputDevices[0].monitorItem: null
- visible: sourceComponent != null
- }
-}
+// Copyright (c) 2017 Ultimaker B.V.
+
+import QtQuick 2.10
+import QtQuick.Controls 1.4
+
+import UM 1.3 as UM
+import Cura 1.0 as Cura
+
+
+Item
+{
+ // parent could be undefined as this component is not visible at all times
+ width: parent ? parent.width : 0
+ height: parent ? parent.height : 0
+
+ // We show a nice overlay on the 3D viewer when the current output device has no monitor view
+ Rectangle
+ {
+ id: viewportOverlay
+
+ color: UM.Theme.getColor("viewport_overlay")
+ width: parent.width
+ height: parent.height
+
+ MouseArea
+ {
+ anchors.fill: parent
+ acceptedButtons: Qt.AllButtons
+ onWheel: wheel.accepted = true
+ }
+ }
+
+ Loader
+ {
+ id: monitorViewComponent
+
+ anchors.top: parent.top
+ anchors.bottom: parent.bottom
+ anchors.left: parent.left
+
+ width: parent.width * 0.7
+ height: parent.height
+
+ property real maximumWidth: parent.width
+ property real maximumHeight: parent.height
+
+ sourceComponent: Cura.MachineManager.printerOutputDevices.length > 0 ? Cura.MachineManager.printerOutputDevices[0].monitorItem: null
+ }
+
+ Loader
+ {
+ id: monitorSidebarComponent
+
+ anchors.top: parent.top
+ anchors.bottom: parent.bottom
+ anchors.left: monitorViewComponent.right
+ anchors.right: parent.right
+
+ source: UM.Controller.activeStage.sidebarComponent != null ? UM.Controller.activeStage.sidebarComponent : ""
+ }
+}