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

@ -121,13 +121,13 @@ QtObject {
Item
{
anchors.centerIn: parent
width: Math.floor(textLabel.width + icon.width + Theme.getSize("default_margin").width / 2)
width: Math.round(textLabel.width + icon.width + Theme.getSize("default_margin").width / 2)
Label
{
id: textLabel
text: control.text
anchors.right: icon.visible ? icon.left : parent.right
anchors.rightMargin: icon.visible ? Math.floor(Theme.getSize("default_margin").width / 2) : 0
anchors.rightMargin: icon.visible ? Math.round(Theme.getSize("default_margin").width / 2) : 0
anchors.verticalCenter: parent.verticalCenter;
font: control.checked ? UM.Theme.getFont("large") : UM.Theme.getFont("large_nonbold")
color:
@ -268,7 +268,7 @@ QtObject {
anchors.leftMargin: Theme.getSize("button_tooltip_arrow").width * 2
anchors.verticalCenter: parent.verticalCenter
target: Qt.point(parent.x, y + Math.floor(height/2))
target: Qt.point(parent.x, y + Math.round(height/2))
arrowSize: Theme.getSize("button_tooltip_arrow").width
color: Theme.getColor("button_tooltip")
opacity: control.hovered ? 1.0 : 0.0;
@ -329,9 +329,9 @@ QtObject {
UM.RecolorImage {
id: tool_button_arrow
anchors.right: parent.right;
anchors.rightMargin: Theme.getSize("button").width - Math.floor(Theme.getSize("button_icon").width / 4)
anchors.rightMargin: Theme.getSize("button").width - Math.round(Theme.getSize("button_icon").width / 4)
anchors.bottom: parent.bottom;
anchors.bottomMargin: Theme.getSize("button").height - Math.floor(Theme.getSize("button_icon").height / 4)
anchors.bottomMargin: Theme.getSize("button").height - Math.round(Theme.getSize("button_icon").height / 4)
width: Theme.getSize("standard_arrow").width
height: Theme.getSize("standard_arrow").height
sourceSize.width: width
@ -669,7 +669,7 @@ QtObject {
id: category_arrow
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.rightMargin: Theme.getSize("default_margin").width * 3 - Math.floor(width / 2)
anchors.rightMargin: Theme.getSize("default_margin").width * 3 - Math.round(width / 2)
width: Theme.getSize("standard_arrow").width
height: Theme.getSize("standard_arrow").height
sourceSize.width: width
@ -712,14 +712,14 @@ QtObject {
scrollBarBackground: Rectangle {
implicitWidth: Theme.getSize("scrollbar").width
radius: Math.floor(implicitWidth / 2)
radius: Math.round(implicitWidth / 2)
color: Theme.getColor("scrollbar_background");
}
handle: Rectangle {
id: scrollViewHandle
implicitWidth: Theme.getSize("scrollbar").width;
radius: Math.floor(implicitWidth / 2)
radius: Math.round(implicitWidth / 2)
color: styleData.pressed ? Theme.getColor("scrollbar_handle_down") : styleData.hovered ? Theme.getColor("scrollbar_handle_hover") : Theme.getColor("scrollbar_handle");
Behavior on color { ColorAnimation { duration: 50; } }
@ -806,12 +806,12 @@ QtObject {
Rectangle {
id: swatch
height: Math.floor(UM.Theme.getSize("setting_control").height / 2)
height: Math.round(UM.Theme.getSize("setting_control").height / 2)
width: height
anchors.right: downArrow.left
anchors.verticalCenter: parent.verticalCenter
anchors.margins: Math.floor(UM.Theme.getSize("default_margin").width / 4)
radius: Math.floor(width / 2)
anchors.margins: Math.round(UM.Theme.getSize("default_margin").width / 4)
radius: Math.round(width / 2)
border.width: UM.Theme.getSize("default_lining").width
border.color: UM.Theme.getColor("lining")
color: (control.color_override !== "") ? control.color_override : control.color
@ -845,7 +845,7 @@ QtObject {
color: (control.hovered || control._hovered) ? Theme.getColor("checkbox_hover") : Theme.getColor("checkbox");
Behavior on color { ColorAnimation { duration: 50; } }
radius: control.exclusiveGroup ? Math.floor(Theme.getSize("checkbox").width / 2) : 0
radius: control.exclusiveGroup ? Math.round(Theme.getSize("checkbox").width / 2) : 0
border.width: Theme.getSize("default_lining").width;
border.color: (control.hovered || control._hovered) ? Theme.getColor("checkbox_border_hover") : Theme.getColor("checkbox_border");
@ -853,8 +853,8 @@ QtObject {
UM.RecolorImage {
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
width: Math.floor(parent.width / 2.5)
height: Math.floor(parent.height / 2.5)
width: Math.round(parent.width / 2.5)
height: Math.round(parent.height / 2.5)
sourceSize.width: width
sourceSize.height: width
color: Theme.getColor("checkbox_mark")
@ -882,7 +882,7 @@ QtObject {
color: (control.hovered || control._hovered) ? Theme.getColor("checkbox_hover") : Theme.getColor("checkbox");
Behavior on color { ColorAnimation { duration: 50; } }
radius: control.exclusiveGroup ? Math.floor(Theme.getSize("checkbox").width / 2) : 0
radius: control.exclusiveGroup ? Math.round(Theme.getSize("checkbox").width / 2) : 0
border.width: Theme.getSize("default_lining").width;
border.color: (control.hovered || control._hovered) ? Theme.getColor("checkbox_border_hover") : Theme.getColor("checkbox_border");
@ -890,8 +890,8 @@ QtObject {
UM.RecolorImage {
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
width: Math.floor(parent.width / 2.5)
height: Math.floor(parent.height / 2.5)
width: Math.round(parent.width / 2.5)
height: Math.round(parent.height / 2.5)
sourceSize.width: width
sourceSize.height: width
color: Theme.getColor("checkbox_mark")
@ -925,7 +925,7 @@ QtObject {
border.width: Theme.getSize("default_lining").width;
border.color: Theme.getColor("slider_groove_border");
radius: Math.floor(width / 2);
radius: Math.round(width / 2);
Rectangle {
anchors {
@ -934,8 +934,8 @@ QtObject {
bottom: parent.bottom;
}
color: Theme.getColor("slider_groove_fill");
width: Math.floor((control.value / (control.maximumValue - control.minimumValue)) * parent.width);
radius: Math.floor(width / 2);
width: Math.round((control.value / (control.maximumValue - control.minimumValue)) * parent.width);
radius: Math.round(width / 2);
}
}
handle: Rectangle {
@ -944,7 +944,7 @@ QtObject {
color: control.hovered ? Theme.getColor("slider_handle_hover") : Theme.getColor("slider_handle");
border.width: Theme.getSize("default_lining").width
border.color: control.hovered ? Theme.getColor("slider_handle_hover_border") : Theme.getColor("slider_handle_border")
radius: Math.floor(Theme.getSize("slider_handle").width / 2); //Round.
radius: Math.round(Theme.getSize("slider_handle").width / 2); //Round.
Behavior on color { ColorAnimation { duration: 50; } }
}
}