Move machine selector to own component & new location

This also simplifies & cleans up the actually used QML

CURA-5772
This commit is contained in:
Jaime van Kessel 2018-10-11 10:29:59 +02:00
parent 1ed3558b9a
commit 85436c1469
3 changed files with 60 additions and 35 deletions

View file

@ -0,0 +1,48 @@
// Copyright (c) 2017 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.7
import UM 1.2 as UM
import Cura 1.0 as Cura
import "../Menus"
import "../Menus/ConfigurationMenu"
import ".."
Rectangle
{
color: UM.Theme.getColor("sidebar_lining_thin")
implicitHeight: UM.Theme.getSize("sidebar_header").height
implicitWidth: UM.Theme.getSize("sidebar").width
property bool isNetworkPrinter: Cura.MachineManager.activeMachineNetworkKey != ""
property bool printerConnected: Cura.MachineManager.printerConnected
MachineSelection
{
id: machineSelection
anchors
{
left: parent.left
right: configSelection.left
rightMargin: UM.Theme.getSize("sidebar_lining_thin").height / 2
top: parent.top
bottom: parent.bottom
}
}
ConfigurationSelection
{
id: configSelection
visible: isNetworkPrinter && printerConnected
width: visible ? Math.round(parent.width * 0.15) : 0
panelWidth: parent.width
anchors
{
right: parent.right
top: parent.top
bottom: parent.bottom
}
}
}