Replace labels for UM.Label in DiscoverUM3Action

CURA-8685
This commit is contained in:
Jaime van Kessel 2022-02-15 15:50:48 +01:00
parent 713a5cb4e5
commit 40f835ed13

View File

@ -37,22 +37,17 @@ Cura.MachineAction
SystemPalette { id: palette } SystemPalette { id: palette }
UM.I18nCatalog { id: catalog; name:"cura" } UM.I18nCatalog { id: catalog; name:"cura" }
Label UM.Label
{ {
id: pageTitle id: pageTitle
width: parent.width width: parent.width
text: catalog.i18nc("@title:window", "Connect to Networked Printer") text: catalog.i18nc("@title:window", "Connect to Networked Printer")
wrapMode: Text.WordWrap
renderType: Text.NativeRendering
font.pointSize: 18
} }
Label UM.Label
{ {
id: pageDescription id: pageDescription
width: parent.width width: parent.width
wrapMode: Text.WordWrap
renderType: Text.NativeRendering
text: catalog.i18nc("@label", "To print directly to your printer over the network, please make sure your printer is connected to the network using a network cable or by connecting your printer to your WIFI network. If you don't connect Cura with your printer, you can still use a USB drive to transfer g-code files to your printer.") + "\n\n" + catalog.i18nc("@label", "Select your printer from the list below:") text: catalog.i18nc("@label", "To print directly to your printer over the network, please make sure your printer is connected to the network using a network cable or by connecting your printer to your WIFI network. If you don't connect Cura with your printer, you can still use a USB drive to transfer g-code files to your printer.") + "\n\n" + catalog.i18nc("@label", "Select your printer from the list below:")
} }
@ -158,13 +153,11 @@ Cura.MachineAction
} }
} }
} }
Label UM.Label
{ {
id: discoveryTip id: discoveryTip
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
wrapMode: Text.WordWrap
renderType: Text.NativeRendering
text: catalog.i18nc("@label", "If your printer is not listed, read the <a href='%1'>network printing troubleshooting guide</a>").arg("https://ultimaker.com/en/cura/troubleshooting/network?utm_source=cura&utm_medium=software&utm_campaign=manage-network-printer"); text: catalog.i18nc("@label", "If your printer is not listed, read the <a href='%1'>network printing troubleshooting guide</a>").arg("https://ultimaker.com/en/cura/troubleshooting/network?utm_source=cura&utm_medium=software&utm_campaign=manage-network-printer");
onLinkActivated: Qt.openUrlExternally(link) onLinkActivated: Qt.openUrlExternally(link)
} }
@ -175,32 +168,27 @@ Cura.MachineAction
width: Math.round(parent.width * 0.5) width: Math.round(parent.width * 0.5)
visible: base.selectedDevice ? true : false visible: base.selectedDevice ? true : false
spacing: UM.Theme.getSize("default_margin").height spacing: UM.Theme.getSize("default_margin").height
Label UM.Label
{ {
width: parent.width width: parent.width
wrapMode: Text.WordWrap
text: base.selectedDevice ? base.selectedDevice.name : "" text: base.selectedDevice ? base.selectedDevice.name : ""
font: UM.Theme.getFont("large_bold") font: UM.Theme.getFont("large_bold")
elide: Text.ElideRight elide: Text.ElideRight
renderType: Text.NativeRendering
} }
Grid Grid
{ {
visible: base.completeProperties visible: base.completeProperties
width: parent.width width: parent.width
columns: 2 columns: 2
Label property real labelWidth: Math.round(width * 0.5)
UM.Label
{ {
width: Math.round(parent.width * 0.5) width: labelWidth
wrapMode: Text.WordWrap
renderType: Text.NativeRendering
text: catalog.i18nc("@label", "Type") text: catalog.i18nc("@label", "Type")
} }
Label UM.Label
{ {
width: Math.round(parent.width * 0.5) width: labelWidth
wrapMode: Text.WordWrap
renderType: Text.NativeRendering
text: text:
{ {
if (base.selectedDevice) { if (base.selectedDevice) {
@ -209,41 +197,31 @@ Cura.MachineAction
return "" return ""
} }
} }
Label UM.Label
{ {
width: Math.round(parent.width * 0.5) width: labelWidth
wrapMode: Text.WordWrap
renderType: Text.NativeRendering
text: catalog.i18nc("@label", "Firmware version") text: catalog.i18nc("@label", "Firmware version")
} }
Label UM.Label
{ {
width: Math.round(parent.width * 0.5) width: labelWidth
wrapMode: Text.WordWrap
renderType: Text.NativeRendering
text: base.selectedDevice ? base.selectedDevice.firmwareVersion : "" text: base.selectedDevice ? base.selectedDevice.firmwareVersion : ""
} }
Label UM.Label
{ {
width: Math.round(parent.width * 0.5) width: labelWidth
wrapMode: Text.WordWrap
renderType: Text.NativeRendering
text: catalog.i18nc("@label", "Address") text: catalog.i18nc("@label", "Address")
} }
Label UM.Label
{ {
width: Math.round(parent.width * 0.5) width: labelWidth
wrapMode: Text.WordWrap
renderType: Text.NativeRendering
text: base.selectedDevice ? base.selectedDevice.ipAddress : "" text: base.selectedDevice ? base.selectedDevice.ipAddress : ""
} }
} }
Label UM.Label
{ {
width: parent.width width: parent.width
wrapMode: Text.WordWrap
renderType: Text.NativeRendering
text:{ text:{
// The property cluster size does not exist for older UM3 devices. // The property cluster size does not exist for older UM3 devices.
if(!base.selectedDevice || base.selectedDevice.clusterSize == null || base.selectedDevice.clusterSize == 1) if(!base.selectedDevice || base.selectedDevice.clusterSize == null || base.selectedDevice.clusterSize == 1)
@ -261,11 +239,9 @@ Cura.MachineAction
} }
} }
Label UM.Label
{ {
width: parent.width width: parent.width
wrapMode: Text.WordWrap
renderType: Text.NativeRendering
visible: base.selectedDevice != null && !base.completeProperties visible: base.selectedDevice != null && !base.completeProperties
text: catalog.i18nc("@label", "The printer at this address has not yet responded." ) text: catalog.i18nc("@label", "The printer at this address has not yet responded." )
} }
@ -316,15 +292,13 @@ Cura.MachineAction
anchors.fill: parent anchors.fill: parent
spacing: UM.Theme.getSize("default_margin").height spacing: UM.Theme.getSize("default_margin").height
Label UM.Label
{ {
text: catalog.i18nc("@label", "Enter the IP address of your printer on the network.") text: catalog.i18nc("@label", "Enter the IP address of your printer on the network.")
width: parent.width
wrapMode: Text.WordWrap
renderType: Text.NativeRendering renderType: Text.NativeRendering
} }
TextField Cura.TextField
{ {
id: addressField id: addressField
width: parent.width width: parent.width