Update usb printing menu to qt controls 2

CURA-8688
This commit is contained in:
casper 2022-03-01 11:36:47 +01:00
parent e131c596df
commit bd1b0fb34c
5 changed files with 65 additions and 55 deletions

View file

@ -1,7 +1,9 @@
// Copyright (c) 2022 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.2
import QtQuick.Controls 1.1
import QtQuick.Layouts 1.1
import QtQuick.Controls 2.1
import UM 1.2 as UM
import Cura 1.0 as Cura
@ -27,7 +29,7 @@ Item
height: childrenRect.height
color: UM.Theme.getColor("setting_category")
Label
UM.Label
{
id: outputDeviceNameLabel
font: UM.Theme.getFont("large_bold")
@ -38,7 +40,7 @@ Item
text: outputDevice != null ? outputDevice.activePrinter.name : ""
}
Label
UM.Label
{
id: outputDeviceAddressLabel
text: (outputDevice != null && outputDevice.address != null) ? outputDevice.address : ""
@ -49,11 +51,10 @@ Item
anchors.margins: UM.Theme.getSize("default_margin").width
}
Label
UM.Label
{
text: outputDevice != null ? "" : 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("default")
wrapMode: Text.WordWrap
anchors.left: parent.left
anchors.leftMargin: UM.Theme.getSize("default_margin").width