Merge branch '3.2'

Conflicts in Cura.qml and SaveButton.qml from people fixing positioning rounding at the same time...
This commit is contained in:
Ghostkeeper 2018-02-12 13:10:24 +01:00
commit 03b4213e92
No known key found for this signature in database
GPG key ID: 5252B696FB5E7C7A
17 changed files with 46 additions and 43 deletions

View file

@ -484,7 +484,7 @@ UM.MainWindow
anchors
{
horizontalCenter: parent.horizontalCenter
horizontalCenterOffset: -(Math.floor(UM.Theme.getSize("sidebar").width/ 2))
horizontalCenterOffset: -(Math.floor(UM.Theme.getSize("sidebar").width / 2))
top: parent.verticalCenter;
bottom: parent.bottom;
}

View file

@ -94,7 +94,7 @@ Item {
{
id: printJobTextfield
anchors.right: printJobPencilIcon.left
anchors.rightMargin: Math.floor(UM.Theme.getSize("default_margin").width/2)
anchors.rightMargin: Math.floor(UM.Theme.getSize("default_margin").width / 2)
height: UM.Theme.getSize("jobspecs_line").height
width: Math.max(__contentWidth + UM.Theme.getSize("default_margin").width, 50)
maximumLength: 120

View file

@ -98,7 +98,7 @@ TabView
Row {
width: scrollView.columnWidth
height: parent.rowHeight
spacing: Math.floor(UM.Theme.getSize("default_margin").width/2)
spacing: Math.floor(UM.Theme.getSize("default_margin").width / 2)
// color indicator square
Rectangle {

View file

@ -59,8 +59,8 @@ UM.ManagementPage
anchors.right: parent.right
Rectangle
{
width: (parent.height * 0.8) | 0
height: (parent.height * 0.8) | 0
width: Math.floor(parent.height * 0.8)
height: Math.floor(parent.height * 0.8)
color: model.metadata.color_code
border.color: isCurrentItem ? palette.highlightedText : palette.text;
anchors.verticalCenter: parent.verticalCenter

View file

@ -76,7 +76,7 @@ Item {
width: parent.width - 2 * UM.Theme.getSize("sidebar_margin").width
height: UM.Theme.getSize("progressbar").height
anchors.top: statusLabel.bottom
anchors.topMargin: Math.floor(UM.Theme.getSize("sidebar_margin").height/4)
anchors.topMargin: Math.floor(UM.Theme.getSize("sidebar_margin").height / 4)
anchors.left: parent.left
anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width
radius: UM.Theme.getSize("progressbar_radius").width

View file

@ -187,8 +187,8 @@ Button
id: settingsButton
visible: base.hovered || settingsButton.hovered
height: base.height * 0.6
width: base.height * 0.6
height: Math.floor(base.height * 0.6)
width: Math.floor(base.height * 0.6)
anchors {
right: inheritButton.visible ? inheritButton.left : parent.right

View file

@ -68,7 +68,7 @@ SettingItem
{
id: downArrow
x: control.width - width - control.rightPadding
y: control.topPadding + (control.availableHeight - height) / 2
y: control.topPadding + Math.floor((control.availableHeight - height) / 2)
source: UM.Theme.getIcon("arrow_bottom")
width: UM.Theme.getSize("standard_arrow").width

View file

@ -108,7 +108,7 @@ Item {
id: label;
anchors.left: parent.left;
anchors.leftMargin: doDepthIndentation ? (UM.Theme.getSize("section_icon_column").width + 5) + ((definition.depth - 1) * UM.Theme.getSize("setting_control_depth_margin").width) : 0
anchors.leftMargin: doDepthIndentation ? Math.floor((UM.Theme.getSize("section_icon_column").width + 5) + ((definition.depth - 1) * UM.Theme.getSize("setting_control_depth_margin").width)) : 0
anchors.right: settingControls.left;
anchors.verticalCenter: parent.verticalCenter

View file

@ -204,7 +204,7 @@ Item
iconSource: UM.Theme.getIcon("cross1")
visible: findingSettings
height: parent.height * 0.4
height: Math.floor(parent.height * 0.4)
width: visible ? height : 0
anchors.verticalCenter: parent.verticalCenter
@ -388,7 +388,7 @@ Item
contextMenu.provider = provider
contextMenu.popup();
}
onShowTooltip: base.showTooltip(delegate, { x: -UM.Theme.getSize("default_arrow").width, y: delegate.height / 2 }, text)
onShowTooltip: base.showTooltip(delegate, { x: -UM.Theme.getSize("default_arrow").width, y: Math.floor(delegate.height / 2) }, text)
onHideTooltip: base.hideTooltip()
onShowAllHiddenInheritedSettings:
{

View file

@ -171,7 +171,7 @@ Rectangle
id: control
height: settingsModeSelection.height
width: Math.floor(0.5 * parent.width)
width: Math.floor(parent.width / 2)
anchors.left: parent.left
anchors.leftMargin: model.index * Math.floor(settingsModeSelection.width / 2)

View file

@ -257,7 +257,7 @@ Column
visible: Cura.MachineManager.hasMaterials
enabled: !extrudersList.visible || base.currentExtruderIndex > -1
height: UM.Theme.getSize("setting_control").height
width: parent.width * 0.7 + UM.Theme.getSize("sidebar_margin").width
width: Math.floor(parent.width * 0.7) + UM.Theme.getSize("sidebar_margin").width
anchors.right: parent.right
style: UM.Theme.styles.sidebar_header_button
activeFocusOnPress: true;

View file

@ -146,16 +146,16 @@ Item
}
function calculateSliderStepWidth (totalTicks) {
qualityModel.qualitySliderStepWidth = totalTicks != 0 ? (base.width * 0.55) / (totalTicks) : 0
qualityModel.qualitySliderStepWidth = totalTicks != 0 ? Math.floor((base.width * 0.55) / (totalTicks)) : 0
}
function calculateSliderMargins (availableMin, availableMax, totalTicks) {
if (availableMin == -1 || (availableMin == 0 && availableMax == 0)) {
qualityModel.qualitySliderMarginRight = base.width * 0.55
qualityModel.qualitySliderMarginRight = Math.floor(base.width * 0.55)
} else if (availableMin == availableMax) {
qualityModel.qualitySliderMarginRight = (totalTicks - availableMin) * qualitySliderStepWidth
qualityModel.qualitySliderMarginRight = Math.floor((totalTicks - availableMin) * qualitySliderStepWidth)
} else {
qualityModel.qualitySliderMarginRight = (totalTicks - availableMax) * qualitySliderStepWidth
qualityModel.qualitySliderMarginRight = Math.floor((totalTicks - availableMax) * qualitySliderStepWidth)
}
}
@ -236,7 +236,7 @@ Item
Item
{
id: speedSlider
width: base.width * 0.55
width: Math.floor(base.width * 0.55)
height: UM.Theme.getSize("sidebar_margin").height
anchors.right: parent.right
anchors.top: parent.top
@ -246,7 +246,7 @@ Item
Rectangle
{
id: groovechildrect
width: base.width * 0.55
width: Math.floor(base.width * 0.55)
height: 2 * screenScaleFactor
color: UM.Theme.getColor("quality_slider_unavailable")
anchors.verticalCenter: qualitySlider.verticalCenter
@ -266,7 +266,7 @@ Item
width: 1 * screenScaleFactor
height: 6 * screenScaleFactor
y: 0
x: qualityModel.qualitySliderStepWidth * index
x: Math.floor(qualityModel.qualitySliderStepWidth * index)
}
}
@ -362,7 +362,7 @@ Item
text: catalog.i18nc("@label", "Print Speed")
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
width: parseInt(UM.Theme.getSize("sidebar").width * 0.35)
width: Math.floor(UM.Theme.getSize("sidebar").width * 0.35)
elide: Text.ElideRight
}
@ -438,7 +438,7 @@ Item
anchors.topMargin: UM.Theme.getSize("sidebar_margin").height * 2
anchors.left: parent.left
width: parseInt(UM.Theme.getSize("sidebar").width * .45 - UM.Theme.getSize("sidebar_margin").width)
width: Math.floor(UM.Theme.getSize("sidebar").width * .45) - UM.Theme.getSize("sidebar_margin").width
Label
{
@ -448,7 +448,7 @@ Item
color: UM.Theme.getColor("text")
anchors.top: parent.top
anchors.topMargin: parseInt(UM.Theme.getSize("sidebar_margin").height * 1.7)
anchors.topMargin: Math.floor(UM.Theme.getSize("sidebar_margin").height * 1.7)
anchors.left: parent.left
anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width
}
@ -459,7 +459,7 @@ Item
id: infillCellRight
height: infillSlider.height + UM.Theme.getSize("sidebar_margin").height + enableGradualInfillCheckBox.visible * (enableGradualInfillCheckBox.height + UM.Theme.getSize("sidebar_margin").height)
width: parseInt(UM.Theme.getSize("sidebar").width * .55)
width: Math.floor(UM.Theme.getSize("sidebar").width * .55)
anchors.left: infillCellLeft.right
anchors.top: infillCellLeft.top
@ -737,7 +737,7 @@ Item
visible: enableSupportCheckBox.visible
anchors.top: infillCellRight.bottom
anchors.topMargin: parseInt(UM.Theme.getSize("sidebar_margin").height * 1.5)
anchors.topMargin: Math.floor(UM.Theme.getSize("sidebar_margin").height * 1.5)
anchors.left: parent.left
anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width
anchors.right: infillCellLeft.right
@ -823,7 +823,7 @@ Item
anchors.topMargin: ((supportEnabled.properties.value === "True") && (machineExtruderCount.properties.value > 1)) ? UM.Theme.getSize("sidebar_margin").height : 0
anchors.left: infillCellRight.left
width: UM.Theme.getSize("sidebar").width * .55
width: Math.floor(UM.Theme.getSize("sidebar").width * .55)
height: ((supportEnabled.properties.value == "True") && (machineExtruderCount.properties.value > 1)) ? UM.Theme.getSize("setting_control").height : 0
Behavior on height { NumberAnimation { duration: 100 } }
@ -952,7 +952,7 @@ Item
{
id: tipsCell
anchors.top: adhesionCheckBox.visible ? adhesionCheckBox.bottom : (enableSupportCheckBox.visible ? supportExtruderCombobox.bottom : infillCellRight.bottom)
anchors.topMargin: parseInt(UM.Theme.getSize("sidebar_margin").height * 2)
anchors.topMargin: Math.floor(UM.Theme.getSize("sidebar_margin").height * 2)
anchors.left: parent.left
width: parent.width
height: tipsText.contentHeight * tipsText.lineCount

View file

@ -220,7 +220,7 @@ Rectangle
anchors.topMargin: UM.Theme.getSize("default_margin").height
anchors.right: viewModeButton.right
property var buttonTarget: Qt.point(viewModeButton.x + viewModeButton.width / 2, viewModeButton.y + viewModeButton.height / 2)
property var buttonTarget: Qt.point(viewModeButton.x + Math.floor(viewModeButton.width / 2), viewModeButton.y + Math.floor(viewModeButton.height / 2))
height: childrenRect.height
width: childrenRect.width