mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 15:44:04 -06:00
Update check box icons name to new icon name
Change checkbox check icon to have set height and width in theme.json. Math.round(parent.width/2.5) would always evaluate to 1 since the width of the check icons parent is fixed.
This commit is contained in:
parent
cac27770ce
commit
c54c375a7c
4 changed files with 19 additions and 19 deletions
|
@ -28,11 +28,11 @@ CheckBox
|
||||||
{
|
{
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
width: Math.round(parent.width / 2.5)
|
height: UM.Theme.getSize("checkbox_mark").height
|
||||||
height: Math.round(parent.height / 2.5)
|
width: UM.Theme.getSize("checkbox_mark").width
|
||||||
sourceSize.height: width
|
sourceSize.height: width
|
||||||
color: UM.Theme.getColor("checkbox_mark")
|
color: UM.Theme.getColor("checkbox_mark")
|
||||||
source: UM.Theme.getIcon("Check")
|
source: UM.Theme.getIcon("EmptyCheck", "low")
|
||||||
opacity: checkbox.checked
|
opacity: checkbox.checked
|
||||||
Behavior on opacity { NumberAnimation { duration: 100; } }
|
Behavior on opacity { NumberAnimation { duration: 100; } }
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,11 +85,11 @@ SettingItem
|
||||||
{
|
{
|
||||||
anchors
|
anchors
|
||||||
{
|
{
|
||||||
top: parent.top
|
verticalCenter: parent.verticalCenter
|
||||||
bottom: parent.bottom
|
|
||||||
left: parent.left
|
left: parent.left
|
||||||
}
|
}
|
||||||
width: height
|
width: UM.Theme.getSize("checkbox").width
|
||||||
|
height: width
|
||||||
|
|
||||||
radius: UM.Theme.getSize("setting_control_radius").width
|
radius: UM.Theme.getSize("setting_control_radius").width
|
||||||
border.width: UM.Theme.getSize("default_lining").width
|
border.width: UM.Theme.getSize("default_lining").width
|
||||||
|
@ -147,11 +147,11 @@ SettingItem
|
||||||
{
|
{
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
width: Math.round(parent.width / 2.5)
|
height: UM.Theme.getSize("checkbox_mark").height
|
||||||
height: Math.round(parent.height / 2.5)
|
width: UM.Theme.getSize("checkbox_mark").width
|
||||||
sourceSize.height: width
|
sourceSize.height: width
|
||||||
color: !enabled ? UM.Theme.getColor("setting_control_disabled_text") : UM.Theme.getColor("setting_control_text");
|
color: !enabled ? UM.Theme.getColor("setting_control_disabled_text") : UM.Theme.getColor("setting_control_text");
|
||||||
source: UM.Theme.getIcon("Check")
|
source: UM.Theme.getIcon("EmptyCheck", "low")
|
||||||
opacity: control.checked ? 1 : 0
|
opacity: control.checked ? 1 : 0
|
||||||
Behavior on opacity { NumberAnimation { duration: 100; } }
|
Behavior on opacity { NumberAnimation { duration: 100; } }
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,11 +54,11 @@ CheckBox
|
||||||
{
|
{
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
width: Math.round(parent.width / 2.5)
|
height: UM.Theme.getSize("checkbox_mark").height
|
||||||
height: Math.round(parent.height / 2.5)
|
width: UM.Theme.getSize("checkbox_mark").width
|
||||||
sourceSize.height: width
|
sourceSize.height: width
|
||||||
color: !enabled ? UM.Theme.getColor("setting_control_disabled_text") : UM.Theme.getColor("setting_control_text")
|
color: !enabled ? UM.Theme.getColor("setting_control_disabled_text") : UM.Theme.getColor("setting_control_text")
|
||||||
source: UM.Theme.getIcon("Check")
|
source: UM.Theme.getIcon("EmptyCheck", "low")
|
||||||
opacity: control.checked ? 1 : 0
|
opacity: control.checked ? 1 : 0
|
||||||
Behavior on opacity { NumberAnimation { duration: 100; } }
|
Behavior on opacity { NumberAnimation { duration: 100; } }
|
||||||
}
|
}
|
||||||
|
|
|
@ -408,7 +408,7 @@ QtObject
|
||||||
|
|
||||||
color: (control.hovered || control._hovered) ? UM.Theme.getColor("checkbox_hover") : (control.enabled ? UM.Theme.getColor("checkbox") : UM.Theme.getColor("checkbox_disabled"))
|
color: (control.hovered || control._hovered) ? UM.Theme.getColor("checkbox_hover") : (control.enabled ? UM.Theme.getColor("checkbox") : UM.Theme.getColor("checkbox_disabled"))
|
||||||
Behavior on color { ColorAnimation { duration: 50; } }
|
Behavior on color { ColorAnimation { duration: 50; } }
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
radius: control.exclusiveGroup ? Math.round(UM.Theme.getSize("checkbox").width / 2) : UM.Theme.getSize("checkbox_radius").width
|
radius: control.exclusiveGroup ? Math.round(UM.Theme.getSize("checkbox").width / 2) : UM.Theme.getSize("checkbox_radius").width
|
||||||
|
|
||||||
border.width: UM.Theme.getSize("default_lining").width
|
border.width: UM.Theme.getSize("default_lining").width
|
||||||
|
@ -418,11 +418,11 @@ QtObject
|
||||||
{
|
{
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
width: Math.round(parent.width / 2.5)
|
height: UM.Theme.getSize("checkbox_mark").height
|
||||||
height: Math.round(parent.height / 2.5)
|
width: UM.Theme.getSize("checkbox_mark").width
|
||||||
sourceSize.height: width
|
sourceSize.height: width
|
||||||
color: UM.Theme.getColor("checkbox_mark")
|
color: UM.Theme.getColor("checkbox_mark")
|
||||||
source: control.exclusiveGroup ? UM.Theme.getIcon("Dot") : UM.Theme.getIcon("Check")
|
source: control.exclusiveGroup ? UM.Theme.getIcon("Dot") : UM.Theme.getIcon("EmptyCheck", "low")
|
||||||
opacity: control.checked
|
opacity: control.checked
|
||||||
Behavior on opacity { NumberAnimation { duration: 100; } }
|
Behavior on opacity { NumberAnimation { duration: 100; } }
|
||||||
}
|
}
|
||||||
|
@ -460,8 +460,8 @@ QtObject
|
||||||
{
|
{
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
width: Math.round(parent.width / 2.5)
|
height: UM.Theme.getSize("checkbox_mark").height
|
||||||
height: Math.round(parent.height / 2.5)
|
width: UM.Theme.getSize("checkbox_mark").width
|
||||||
sourceSize.height: width
|
sourceSize.height: width
|
||||||
color: UM.Theme.getColor("checkbox_mark")
|
color: UM.Theme.getColor("checkbox_mark")
|
||||||
source:
|
source:
|
||||||
|
@ -472,7 +472,7 @@ QtObject
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return control.exclusiveGroup ? UM.Theme.getIcon("Dot", "low") : UM.Theme.getIcon("Check");
|
return control.exclusiveGroup ? UM.Theme.getIcon("Dot", "low") : UM.Theme.getIcon("EmptyCheck", "low");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
opacity: control.checked
|
opacity: control.checked
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue