Merge branch 'master' into feature_move_logo_icons

This commit is contained in:
Lipu Fei 2017-09-06 15:36:22 +02:00
commit d561af63e0
9 changed files with 61 additions and 53 deletions

View File

@ -227,7 +227,7 @@ class PrintInformation(QObject):
# when a file is opened using the terminal; the filename comes from _onFileLoaded and still contains its
# extension. This cuts the extension off if necessary.
name = os.path.splitext(name)[0]
name = self.createJobName(name)
if self._job_name != name and (self._job_name == "" or name == ""):
self._job_name = name
self.jobNameChanged.emit()

View File

@ -1099,8 +1099,11 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
global_container_stack.setMetaDataEntry("network_authentication_id", self._authentication_id)
else:
global_container_stack.addMetaDataEntry("network_authentication_id", self._authentication_id)
Application.getInstance().saveStack(global_container_stack) # Force save so we are sure the data is not lost.
Logger.log("i", "Authentication succeeded for id %s and key %s", self._authentication_id, self._getSafeAuthKey())
Logger.log("i", "Authentication succeeded for id %s and key %s", self._authentication_id, self._getSafeAuthKey())
Application.getInstance().saveStack(global_container_stack) # Force save so we are sure the data is not lost.
else:
Logger.log("w", "Unable to save authentication for id %s and key %s", self._authentication_id, self._getSafeAuthKey())
else: # Got a response that we didn't expect, so something went wrong.
Logger.log("e", "While trying to authenticate, we got an unexpected response: %s", reply.attribute(QNetworkRequest.HttpStatusCodeAttribute))
self.setAuthenticationState(AuthState.NotAuthenticated)

View File

@ -57,17 +57,18 @@ Button
{
right: parent.right
top: parent.top
margins: UM.Theme.getSize("extruder_button_material_margin").width
rightMargin: UM.Theme.getSize("extruder_button_material_margin").width
topMargin: UM.Theme.getSize("extruder_button_material_margin").height
}
color: model.color
width: UM.Theme.getSize("extruder_button_material_size").width
height: UM.Theme.getSize("extruder_button_material_size").height
width: UM.Theme.getSize("extruder_button_material").width
height: UM.Theme.getSize("extruder_button_material").height
radius: width / 2
border.width: 0
border.color: "transparent"
border.width: 1
border.color: UM.Theme.getColor("extruder_button_material_border")
opacity: !base.enabled ? 0.2 : 1.0
}

View File

@ -121,7 +121,7 @@ Rectangle
anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width
anchors.top: headerSeparator.bottom
anchors.topMargin: UM.Theme.getSize("sidebar_margin").height
width: parent.width * 0.45 - 2 * UM.Theme.getSize("sidebar_margin").width
width: parent.width * 0.45
font: UM.Theme.getFont("large")
color: UM.Theme.getColor("text")
visible: !monitoringPrint
@ -223,7 +223,7 @@ Rectangle
{
id: globalProfileLabel
text: catalog.i18nc("@label","Profile:");
width: parent.width * 0.45 - UM.Theme.getSize("sidebar_margin").width
width: parent.width * 0.45 - UM.Theme.getSize("sidebar_margin").width - 2
font: UM.Theme.getFont("default");
color: UM.Theme.getColor("text");
verticalAlignment: Text.AlignVCenter
@ -247,7 +247,7 @@ Rectangle
}
enabled: !header.currentExtruderVisible || header.currentExtruderIndex > -1
width: parent.width * 0.7 + UM.Theme.getSize("sidebar_margin").width
width: parent.width * 0.55
height: UM.Theme.getSize("setting_control").height
anchors.left: globalProfileLabel.right
anchors.right: parent.right

View File

@ -17,48 +17,51 @@ Column
property int currentExtruderIndex: ExtruderManager.activeExtruderIndex;
property bool currentExtruderVisible: extrudersList.visible;
spacing: UM.Theme.getSize("sidebar_margin").height
spacing: UM.Theme.getSize("sidebar_margin").width * 0.9
signal showTooltip(Item item, point location, string text)
signal hideTooltip()
Item
{
height: UM.Theme.getSize("default_margin").height / 4
width: height
visible: extruderSelectionRow.visible
}
Label
{
id: extruderSelectionLabel
anchors
{
left: parent.left
leftMargin: UM.Theme.getSize("default_margin").width
right: parent.right
rightMargin: UM.Theme.getSize("default_margin").width
}
height: UM.Theme.getSize("sidebar_tabs").height / 3
text: catalog.i18nc("@label", "Extruder configuration")
font: UM.Theme.getFont("default_bold")
color: UM.Theme.getColor("text")
visible: extruderSelectionRow.visible
height: UM.Theme.getSize("default_lining").height
width: height
}
Item
{
anchors
{
left: parent.left
leftMargin: UM.Theme.getSize("sidebar_margin").width
right: parent.right
rightMargin: UM.Theme.getSize("sidebar_margin").width
}
visible: extruderSelectionRow.visible
height: UM.Theme.getSize("default_lining").hieght
width: height
}
Item
{
id: extruderSelectionRow
width: parent.width
height: UM.Theme.getSize("sidebar_tabs").height
height: UM.Theme.getSize("sidebar_tabs").height * 2 / 3
visible: machineExtruderCount.properties.value > 1 && !sidebar.monitoringPrint
anchors
{
left: parent.left
leftMargin: UM.Theme.getSize("default_margin").width
leftMargin: UM.Theme.getSize("sidebar_margin").width * 0.7
right: parent.right
rightMargin: UM.Theme.getSize("default_margin").width
rightMargin: UM.Theme.getSize("sidebar_margin").width * 0.7
topMargin: UM.Theme.getSize("sidebar_margin").height
}
ListView
@ -136,7 +139,7 @@ Column
width: {
var extruderTextWidth = extruderStaticText.visible ? extruderStaticText.width : 0;
var iconWidth = extruderIconItem.width;
return extruderTextWidth + iconWidth + UM.Theme.getSize("default_margin").width / 4;
return extruderTextWidth + iconWidth + UM.Theme.getSize("default_margin").width / 2;
}
// Static text "Extruder"
@ -150,7 +153,7 @@ Column
control.hovered ? UM.Theme.getColor("action_button_hovered_text") :
UM.Theme.getColor("action_button_text")
font: UM.Theme.getFont("default")
font: control.checked ? UM.Theme.getFont("default_bold") : UM.Theme.getFont("default")
text: catalog.i18nc("@label", "Extruder")
visible: width < (control.width - extruderIconItem.width - UM.Theme.getSize("default_margin").width)
elide: Text.ElideRight
@ -168,7 +171,7 @@ Column
var minimumWidth = control.width < UM.Theme.getSize("button").width ? control.width : UM.Theme.getSize("button").width;
var minimumHeight = control.height < UM.Theme.getSize("button").height ? control.height : UM.Theme.getSize("button").height;
var minimumSize = minimumWidth < minimumHeight ? minimumWidth : minimumHeight;
minimumSize -= UM.Theme.getSize("default_margin").width;
minimumSize -= UM.Theme.getSize("default_margin").width / 2;
return minimumSize;
}
@ -205,18 +208,18 @@ Column
{
right: parent.right
top: parent.top
rightMargin: parent.sizeToUse * 0.04
topMargin: parent.sizeToUse * 0.04
rightMargin: parent.sizeToUse * 0.01
topMargin: parent.sizeToUse * 0.05
}
color: model.color
width: parent.width * 0.27
height: parent.height * 0.27
width: parent.width * 0.35
height: parent.height * 0.35
radius: width / 2
border.width: 0
border.color: "transparent"
border.width: 1
border.color: UM.Theme.getColor("extruder_button_material_border")
opacity: !control.checked ? 0.6 : 1.0
}
@ -337,7 +340,7 @@ Column
Item
{
id: materialInfoRow
height: UM.Theme.getSize("sidebar_setup").height
height: UM.Theme.getSize("sidebar_setup").height / 2
visible: (Cura.MachineManager.hasVariants || Cura.MachineManager.hasMaterials) && !sidebar.monitoringPrint && !sidebar.hideSettings
anchors
@ -358,10 +361,11 @@ Column
{
id: materialInfoLabel
wrapMode: Text.WordWrap
text: catalog.i18nc("@label", "Check material compability");
text: catalog.i18nc("@label", "Check material compability")
font: UM.Theme.getFont("default");
verticalAlignment: Text.AlignVCenter
verticalAlignment: Text.AlignTop
anchors.top: parent.top
anchors.right: parent.right
anchors.bottom: parent.bottom
color: UM.Theme.getColor("text")

View File

@ -40,7 +40,7 @@ Item
id: infillCellLeft
anchors.top: parent.top
anchors.left: parent.left
anchors.topMargin: UM.Theme.getSize("sidebar_margin").height
anchors.topMargin: UM.Theme.getSize("sidebar_margin").height * 0.8
width: UM.Theme.getSize("sidebar").width * .45 - UM.Theme.getSize("sidebar_margin").width
height: childrenRect.height
@ -275,7 +275,7 @@ Item
property alias _hovered: enableSupportMouseArea.containsMouse
anchors.top: infillCellRight.bottom
anchors.topMargin: UM.Theme.getSize("sidebar_margin").height * 2
anchors.topMargin: UM.Theme.getSize("sidebar_margin").height
anchors.left: infillCellRight.left
style: UM.Theme.styles.checkbox;

View File

@ -94,10 +94,11 @@ Rectangle
{
case "printing":
case "pre_print":
case "wait_cleanup":
case "pausing":
case "resuming":
return UM.Theme.getIcon("tab_status_busy");
case "wait_cleanup":
return UM.Theme.getIcon("tab_status_finished");
case "ready":
case "":
return UM.Theme.getIcon("tab_status_connected")

View File

@ -41,7 +41,7 @@
showgrid="false"
inkscape:pagecheckerboard="true"
inkscape:zoom="23.442308"
inkscape:cx="11.848284"
inkscape:cx="4.9163727"
inkscape:cy="17.941232"
inkscape:window-x="2552"
inkscape:window-y="-8"
@ -61,10 +61,4 @@
style="fill:none;stroke:#ffffff;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
rx="13.735848"
ry="13.735849" />
<circle
style="fill:none;stroke:#ffffff;stroke-width:1.39310181;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path4509"
cx="24.75"
cy="5.25"
r="4.5534492" />
</svg>

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -104,6 +104,11 @@
"button_tooltip_border": [24, 41, 77, 255],
"button_tooltip_text": [24, 41, 77, 255],
"extruder_button_material_border": [255, 255, 255, 255],
"sync_button_text": [120, 120, 120, 255],
"sync_button_text_hovered": [0, 0, 0, 255],
"tab_checked": [255, 255, 255, 255],
"tab_checked_border": [255, 255, 255, 255],
"tab_checked_text": [24, 41, 77, 255],
@ -269,8 +274,8 @@
"default_arrow": [0.8, 0.8],
"logo": [7.6, 1.6],
"extruder_button_material_margin": [0.875, 0.875],
"extruder_button_material_size": [0.68, 0.68],
"extruder_button_material_margin": [0.50, 0.9],
"extruder_button_material": [0.75, 0.75],
"sidebar": [35.0, 10.0],
"sidebar_margin": [1.71, 1.43],