mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Add some comments
Contributes to CL-1154
This commit is contained in:
parent
ee5c6ed3fb
commit
3b8281dc5b
1 changed files with 22 additions and 13 deletions
|
@ -20,6 +20,12 @@ Rectangle
|
||||||
color: UM.Theme.getColor("viewport_overlay")
|
color: UM.Theme.getColor("viewport_overlay")
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
|
UM.I18nCatalog
|
||||||
|
{
|
||||||
|
id: catalog
|
||||||
|
name: "cura"
|
||||||
|
}
|
||||||
|
|
||||||
// This mouse area is to prevent mouse clicks to be passed onto the scene.
|
// This mouse area is to prevent mouse clicks to be passed onto the scene.
|
||||||
MouseArea
|
MouseArea
|
||||||
{
|
{
|
||||||
|
@ -47,15 +53,21 @@ Rectangle
|
||||||
sourceComponent: Cura.MachineManager.printerOutputDevices.length > 0 ? Cura.MachineManager.printerOutputDevices[0].monitorItem : null
|
sourceComponent: Cura.MachineManager.printerOutputDevices.length > 0 ? Cura.MachineManager.printerOutputDevices[0].monitorItem : null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* In an ideal world, this code would go in the UM3NetworkingPlugin but that plugin is never even loaded unless we
|
||||||
|
* manage to connect to them. Moving the conditional in monitorViewComponent.sourceComponent would allow us to
|
||||||
|
* always load the UM3NetworkingPlugin and then evaluate what UI to show, but it would break any other plugins which
|
||||||
|
* use this plugin. So putting some code here felt like the lesser evil.
|
||||||
|
*/
|
||||||
Column
|
Column
|
||||||
{
|
{
|
||||||
anchors
|
anchors
|
||||||
{
|
{
|
||||||
top: parent.top
|
top: parent.top
|
||||||
topMargin: 67 * screenScaleFactor
|
topMargin: 67 * screenScaleFactor // TODO: Theme!
|
||||||
horizontalCenter: parent.horizontalCenter
|
horizontalCenter: parent.horizontalCenter
|
||||||
}
|
}
|
||||||
width: 480 * screenScaleFactor
|
width: 480 * screenScaleFactor // TODO: Theme!
|
||||||
spacing: UM.Theme.getSize("default_margin").height
|
spacing: UM.Theme.getSize("default_margin").height
|
||||||
|
|
||||||
Label
|
Label
|
||||||
|
@ -65,11 +77,11 @@ Rectangle
|
||||||
horizontalCenter: parent.horizontalCenter
|
horizontalCenter: parent.horizontalCenter
|
||||||
}
|
}
|
||||||
visible: isNetworkEnabled && !isConnected
|
visible: isNetworkEnabled && !isConnected
|
||||||
text: "Please smake sure your printer has connection:\n- Check if the printer is turned on.\n- Check if the printer is connected to the network."
|
text: catalog.i18nc("@info", "Please smake sure your printer has connection:\n- Check if the printer is turned on.\n- Check if the printer is connected to the network.")
|
||||||
font: UM.Theme.getFont("medium")
|
font: UM.Theme.getFont("medium")
|
||||||
color: UM.Theme.getColor("monitor_text_primary")
|
color: UM.Theme.getColor("monitor_text_primary")
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
lineHeight: 28 * screenScaleFactor
|
lineHeight: 28 * screenScaleFactor // TODO: Theme!
|
||||||
lineHeightMode: Text.FixedHeight
|
lineHeightMode: Text.FixedHeight
|
||||||
width: contentWidth
|
width: contentWidth
|
||||||
}
|
}
|
||||||
|
@ -81,11 +93,8 @@ Rectangle
|
||||||
horizontalCenter: parent.horizontalCenter
|
horizontalCenter: parent.horizontalCenter
|
||||||
}
|
}
|
||||||
visible: isNetworkEnabled && !isConnected
|
visible: isNetworkEnabled && !isConnected
|
||||||
text: "Reconnect"
|
text: catalog.i18nc("@action:button", "Reconnect")
|
||||||
onClicked:
|
onClicked: Cura.MachineManager.setActiveMachine(Cura.MachineManager.activeMachineId) // Try to refresh
|
||||||
{
|
|
||||||
// nothing
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Label
|
Label
|
||||||
|
@ -95,12 +104,12 @@ Rectangle
|
||||||
horizontalCenter: parent.horizontalCenter
|
horizontalCenter: parent.horizontalCenter
|
||||||
}
|
}
|
||||||
visible: !isNetworkEnabled
|
visible: !isNetworkEnabled
|
||||||
text: "Please select a network connected printer to monitor the status and queue or connect your Ultimaker printer to your local network."
|
text: catalog.i18nc("@info", "Please select a network connected printer to monitor the status and queue or connect your Ultimaker printer to your local network.")
|
||||||
font: UM.Theme.getFont("medium")
|
font: UM.Theme.getFont("medium")
|
||||||
color: UM.Theme.getColor("monitor_text_primary")
|
color: UM.Theme.getColor("monitor_text_primary")
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
width: parent.width
|
width: parent.width
|
||||||
lineHeight: 28 * screenScaleFactor
|
lineHeight: 28 * screenScaleFactor // TODO: Theme!
|
||||||
lineHeightMode: Text.FixedHeight
|
lineHeightMode: Text.FixedHeight
|
||||||
}
|
}
|
||||||
Item
|
Item
|
||||||
|
@ -119,8 +128,8 @@ Rectangle
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
color: UM.Theme.getColor("monitor_text_link")
|
color: UM.Theme.getColor("monitor_text_link")
|
||||||
source: UM.Theme.getIcon("external_link")
|
source: UM.Theme.getIcon("external_link")
|
||||||
width: 16 * screenScaleFactor // TODO: Theme! (Y U NO USE 18 LIKE ALL OTHER ICONS?!)
|
width: 16 * screenScaleFactor // TODO: Theme!
|
||||||
height: 16 * screenScaleFactor // TODO: Theme! (Y U NO USE 18 LIKE ALL OTHER ICONS?!)
|
height: 16 * screenScaleFactor // TODO: Theme!
|
||||||
}
|
}
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue