Merge branch 'master' of github.com:Ultimaker/cura

This commit is contained in:
A.Sasin 2017-10-10 15:48:20 +02:00
commit acb1feb8e7
9 changed files with 721 additions and 9633 deletions

View File

@ -71,6 +71,7 @@ Cura.MachineAction
anchors.topMargin: UM.Theme.getSize("default_margin").height
property real columnWidth: ((width - 3 * UM.Theme.getSize("default_margin").width) / 2) | 0
property real labelColumnWidth: columnWidth * 0.5
Tab
{
@ -247,13 +248,13 @@ Cura.MachineAction
Row
{
spacing: UM.Theme.getSize("default_margin").width * 4 / 5
spacing: UM.Theme.getSize("default_margin").width
Label
{
text: catalog.i18nc("@label", "Number of Extruders")
elide: Text.ElideRight
width: Math.max(0, settingsTabs.columnWidth - 2 * UM.Theme.getSize("default_margin").width - extruderCountComboBox.width)
width: Math.max(0, settingsTabs.labelColumnWidth)
anchors.verticalCenter: extruderCountComboBox.verticalCenter
}
ComboBox
@ -562,7 +563,7 @@ Cura.MachineAction
text: _label
visible: _label != ""
elide: Text.ElideRight
width: Math.max(0, settingsTabs.columnWidth - 2 * UM.Theme.getSize("default_margin").width - textFieldWithUnit.width)
width: Math.max(0, settingsTabs.labelColumnWidth)
anchors.verticalCenter: textFieldWithUnit.verticalCenter
}
@ -648,14 +649,14 @@ Cura.MachineAction
Row
{
spacing: UM.Theme.getSize("default_margin").width * 4 / 5
spacing: UM.Theme.getSize("default_margin").width
Label
{
text: _label
visible: _label != ""
elide: Text.ElideRight
width: Math.max(0, settingsTabs.columnWidth - 2 * UM.Theme.getSize("default_margin").width - comboBox.width)
width: Math.max(0, settingsTabs.labelColumnWidth)
anchors.verticalCenter: comboBox.verticalCenter
}
ComboBox
@ -787,7 +788,7 @@ Cura.MachineAction
text: _label
visible: _label != ""
elide: Text.ElideRight
width: Math.max(0, settingsTabs.columnWidth - 2 * UM.Theme.getSize("default_margin").width - textFieldWithUnit.width)
width: Math.max(0, settingsTabs.labelColumnWidth)
anchors.verticalCenter: textFieldWithUnit.verticalCenter
}

View File

@ -13,7 +13,7 @@ Component
height: maximumHeight
color: UM.Theme.getColor("viewport_background")
property var emphasisColor: "#44c0ff" //TODO: should be linked to theme.
property var emphasisColor: UM.Theme.getColor("setting_control_border_highlight")
property var lineColor: "#DCDCDC" // TODO: Should be linked to theme.
property var cornerRadius: 4 * screenScaleFactor // TODO: Should be linked to theme.
UM.I18nCatalog
@ -27,19 +27,13 @@ Component
id: activePrintersLabel
font: UM.Theme.getFont("large")
text:
{
if (OutputDevice.connectedPrinters.length == 0){
return catalog.i18nc("@label: arg 1 is group name", "%1 is not set up to host a group of connected Ultimaker 3 printers").arg(Cura.MachineManager.printerOutputDevices[0].name)
} else {
return ""
}
anchors {
top: parent.top
topMargin: UM.Theme.getSize("default_margin").height * 2 // a bit more spacing to give it some breathing room
horizontalCenter: parent.horizontalCenter
}
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
anchors.horizontalCenter: parent.horizontalCenter
anchors.topMargin: UM.Theme.getSize("default_margin").height
text: OutputDevice.connectedPrinters.length == 0 ? catalog.i18nc("@label: arg 1 is group name", "%1 is not set up to host a group of connected Ultimaker 3 printers").arg(Cura.MachineManager.printerOutputDevices[0].name) : ""
visible: OutputDevice.connectedPrinters.length == 0
}

View File

@ -333,16 +333,15 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
self._camera_timer.stop()
if self._image_reply:
skip_abort = False
try:
# disconnect the signal
try:
self._image_reply.downloadProgress.disconnect(self._onStreamDownloadProgress)
except Exception as e:
if type(e) != RuntimeError: # can happen the RuntimeError occurs before calling abort (=see below), then then the application will crash
skip_abort = True
pass #The signal was never connected.
if not skip_abort:
self._image_reply.abort()
except Exception:
pass
# abort the request if it's not finished
if not self._image_reply.isFinished():
self._image_reply.close()
except Exception as e: #RuntimeError
pass # It can happen that the wrapped c++ object is already deleted.
self._image_reply = None

View File

@ -145,7 +145,6 @@ class NetworkPrinterOutputDevicePlugin(QObject, OutputDevicePlugin):
Logger.log("e", "Printer returned incorrect UTF-8.")
return
if address not in self._network_requests_buffer:
self._network_requests_buffer[address] = {}
self._network_requests_buffer[address]["system"] = system_info

View File

@ -51,7 +51,7 @@ Rectangle
property var printer
border.width: UM.Theme.getSize("default_lining").width
border.color: mouse.containsMouse ? UM.Theme.getColor("setting_control_border_highlight") : lineColor
border.color: mouse.containsMouse ? emphasisColor : lineColor
z: mouse.containsMouse ? 1 : 0 // Push this item up a bit on mouse over to ensure that the highlighted bottom border is visible.
property var printJob:

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -40,7 +40,7 @@ UM.Dialog
{
id: version
text: "Cura %1".arg(UM.Application.version)
text: catalog.i18nc("@label","version: %1").arg(UM.Application.version)
font: UM.Theme.getFont("large")
anchors.right : logo.right
anchors.top: logo.bottom