Merge branch '3.2'

Lots of conflicts due to rounding vs. flooring of text element positions for weirdness with the font aliasing.
This commit is contained in:
Ghostkeeper 2018-02-14 10:53:51 +01:00
commit ee9de1f11b
No known key found for this signature in database
GPG key ID: 5252B696FB5E7C7A
48 changed files with 999 additions and 875 deletions

View file

@ -1,7 +1,7 @@
// Copyright (c) 2017 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.2
import QtQuick 2.8
import QtQuick.Controls 1.1
import QtQuick.Controls.Styles 1.1
@ -17,7 +17,7 @@ Column
property int currentExtruderIndex: Cura.ExtruderManager.activeExtruderIndex;
property bool currentExtruderVisible: extrudersList.visible;
spacing: Math.floor(UM.Theme.getSize("sidebar_margin").width * 0.9)
spacing: Math.round(UM.Theme.getSize("sidebar_margin").width * 0.9)
signal showTooltip(Item item, point location, string text)
signal hideTooltip()
@ -39,15 +39,15 @@ Column
{
id: extruderSelectionRow
width: parent.width
height: Math.floor(UM.Theme.getSize("sidebar_tabs").height * 2 / 3)
height: Math.round(UM.Theme.getSize("sidebar_tabs").height * 2 / 3)
visible: machineExtruderCount.properties.value > 1 && !sidebar.monitoringPrint
anchors
{
left: parent.left
leftMargin: Math.floor(UM.Theme.getSize("sidebar_margin").width * 0.7)
leftMargin: Math.round(UM.Theme.getSize("sidebar_margin").width * 0.7)
right: parent.right
rightMargin: Math.floor(UM.Theme.getSize("sidebar_margin").width * 0.7)
rightMargin: Math.round(UM.Theme.getSize("sidebar_margin").width * 0.7)
topMargin: UM.Theme.getSize("sidebar_margin").height
}
@ -57,15 +57,15 @@ Column
property var index: 0
height: UM.Theme.getSize("sidebar_header_mode_tabs").height
width: Math.floor(parent.width)
width: Math.round(parent.width)
boundsBehavior: Flickable.StopAtBounds
anchors
{
left: parent.left
leftMargin: Math.floor(UM.Theme.getSize("default_margin").width / 2)
leftMargin: Math.round(UM.Theme.getSize("default_margin").width / 2)
right: parent.right
rightMargin: Math.floor(UM.Theme.getSize("default_margin").width / 2)
rightMargin: Math.round(UM.Theme.getSize("default_margin").width / 2)
verticalCenter: parent.verticalCenter
}
@ -84,7 +84,7 @@ Column
delegate: Button
{
height: ListView.view.height
width: Math.floor(ListView.view.width / extrudersModel.rowCount())
width: Math.round(ListView.view.width / extrudersModel.rowCount())
text: model.name
tooltip: model.name
@ -121,7 +121,7 @@ Column
width: {
var extruderTextWidth = extruderStaticText.visible ? extruderStaticText.width : 0;
var iconWidth = extruderIconItem.width;
return Math.floor(extruderTextWidth + iconWidth + UM.Theme.getSize("default_margin").width / 2);
return Math.round(extruderTextWidth + iconWidth + UM.Theme.getSize("default_margin").width / 2);
}
// Static text "Extruder"
@ -153,7 +153,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 -= Math.floor(UM.Theme.getSize("default_margin").width / 2);
minimumSize -= Math.round(UM.Theme.getSize("default_margin").width / 2);
return minimumSize;
}
@ -192,15 +192,15 @@ Column
{
right: parent.right
top: parent.top
rightMargin: Math.floor(parent.sizeToUse * 0.01)
topMargin: Math.floor(parent.sizeToUse * 0.05)
rightMargin: Math.round(parent.sizeToUse * 0.01)
topMargin: Math.round(parent.sizeToUse * 0.05)
}
color: model.color
width: Math.floor(parent.width * 0.35)
height: Math.floor(parent.height * 0.35)
radius: Math.floor(width / 2)
width: Math.round(parent.width * 0.35)
height: Math.round(parent.height * 0.35)
radius: Math.round(width / 2)
border.width: 1
border.color: UM.Theme.getColor("extruder_button_material_border")
@ -219,7 +219,7 @@ Column
Item
{
id: variantRowSpacer
height: Math.floor(UM.Theme.getSize("sidebar_margin").height / 4)
height: Math.round(UM.Theme.getSize("sidebar_margin").height / 4)
width: height
visible: !extruderSelectionRow.visible
}
@ -243,7 +243,7 @@ Column
{
id: materialLabel
text: catalog.i18nc("@label", "Material");
width: Math.floor(parent.width * 0.45 - UM.Theme.getSize("default_margin").width)
width: Math.round(parent.width * 0.45 - UM.Theme.getSize("default_margin").width)
font: UM.Theme.getFont("default");
color: UM.Theme.getColor("text");
}
@ -257,7 +257,7 @@ Column
visible: Cura.MachineManager.hasMaterials
enabled: !extrudersList.visible || base.currentExtruderIndex > -1
height: UM.Theme.getSize("setting_control").height
width: Math.floor(parent.width * 0.7) + UM.Theme.getSize("sidebar_margin").width
width: Math.round(parent.width * 0.7) + UM.Theme.getSize("sidebar_margin").width
anchors.right: parent.right
style: UM.Theme.styles.sidebar_header_button
activeFocusOnPress: true;
@ -293,7 +293,7 @@ Column
{
id: variantLabel
text: Cura.MachineManager.activeDefinitionVariantsName;
width: Math.floor(parent.width * 0.45 - UM.Theme.getSize("default_margin").width)
width: Math.round(parent.width * 0.45 - UM.Theme.getSize("default_margin").width)
font: UM.Theme.getFont("default");
color: UM.Theme.getColor("text");
}
@ -305,7 +305,7 @@ Column
visible: Cura.MachineManager.hasVariants
height: UM.Theme.getSize("setting_control").height
width: Math.floor(parent.width * 0.7 + UM.Theme.getSize("sidebar_margin").width)
width: Math.round(parent.width * 0.7 + UM.Theme.getSize("sidebar_margin").width)
anchors.right: parent.right
style: UM.Theme.styles.sidebar_header_button
activeFocusOnPress: true;
@ -374,7 +374,7 @@ Column
Item
{
id: materialInfoRow
height: Math.floor(UM.Theme.getSize("sidebar_setup").height / 2)
height: Math.round(UM.Theme.getSize("sidebar_setup").height / 2)
visible: (Cura.MachineManager.hasVariants || Cura.MachineManager.hasMaterials) && !sidebar.monitoringPrint && !sidebar.hideSettings
anchors
@ -388,7 +388,7 @@ Column
Item {
height: UM.Theme.getSize("sidebar_setup").height
anchors.right: parent.right
width: Math.floor(parent.width * 0.7 + UM.Theme.getSize("sidebar_margin").width)
width: Math.round(parent.width * 0.7 + UM.Theme.getSize("sidebar_margin").width)
UM.RecolorImage {
id: warningImage