mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
Moved ExtruderBox and OutputDeviceHeader to their own files.
This makes it a whole lot easier to get an overview. CL-541
This commit is contained in:
parent
0f78b05802
commit
e3d07f1806
4 changed files with 263 additions and 217 deletions
54
resources/qml/PrinterOutput/OutputDeviceHeader.qml
Normal file
54
resources/qml/PrinterOutput/OutputDeviceHeader.qml
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
import QtQuick 2.2
|
||||
|
||||
import QtQuick.Controls 1.1
|
||||
import QtQuick.Controls.Styles 1.1
|
||||
import QtQuick.Layouts 1.1
|
||||
|
||||
import UM 1.2 as UM
|
||||
import Cura 1.0 as Cura
|
||||
|
||||
|
||||
Item
|
||||
{
|
||||
implicitWidth: parent.width
|
||||
implicitHeight: Math.floor(childrenRect.height + UM.Theme.getSize("default_margin").height * 2)
|
||||
property var outputDevice: null
|
||||
Rectangle
|
||||
{
|
||||
anchors.fill: parent
|
||||
color: UM.Theme.getColor("setting_category")
|
||||
|
||||
Label
|
||||
{
|
||||
id: outputDeviceNameLabel
|
||||
font: UM.Theme.getFont("large")
|
||||
color: UM.Theme.getColor("text")
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
anchors.margins: UM.Theme.getSize("default_margin").width
|
||||
text: outputDevice != null ? outputDevice.name : catalog.i18nc("@info:status", "No printer connected")
|
||||
}
|
||||
Label
|
||||
{
|
||||
id: outputDeviceAddressLabel
|
||||
text: (outputDevice != null && outputDevice.address != null) ? outputDevice.address : ""
|
||||
font: UM.Theme.getFont("small")
|
||||
color: UM.Theme.getColor("text_inactive")
|
||||
anchors.top: parent.top
|
||||
anchors.right: parent.right
|
||||
anchors.margins: UM.Theme.getSize("default_margin").width
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: outputDevice != null ? outputDevice.connectionText : catalog.i18nc("@info:status", "The printer is not connected.")
|
||||
color: outputDevice != null && outputDevice.acceptsCommands ? UM.Theme.getColor("setting_control_text") : UM.Theme.getColor("setting_control_disabled_text")
|
||||
font: UM.Theme.getFont("very_small")
|
||||
wrapMode: Text.WordWrap
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||
anchors.top: outputDevice.bottom
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue