Merge pull request #11328 from Ultimaker/CURA-8378_improve_checkbox_visibility

Cura 8378 improve checkbox visibility
This commit is contained in:
Evangelos Trantos 2022-02-02 19:54:34 +02:00 committed by GitHub
commit d7c3495509
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 85 additions and 217 deletions

View file

@ -152,6 +152,7 @@
"checkbox_border": [255, 255, 255, 38],
"checkbox_border_hover": [255, 255, 255, 38],
"checkbox_mark": [255, 255, 255, 181],
"checkbox_square": [118, 118, 118, 255],
"checkbox_text": [255, 255, 255, 181],
"tooltip": [39, 44, 48, 255],

View file

@ -1,3 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path d="M10.7 13.3L7.4 10L6 11.4L10.7 16.1L17.4 9.4L16 8L10.7 13.3Z"/>
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M5 9.41397L2.293 6.70697L3.707 5.29297L5 6.58597L8.293 3.29297L9.707 4.70697L5 9.41397Z" fill="#000E1A"/>
</svg>

Before

Width:  |  Height:  |  Size: 163 B

After

Width:  |  Height:  |  Size: 218 B

Before After
Before After

View file

@ -0,0 +1,4 @@
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="12" height="12" fill="white"/>
<rect x="1" y="1" width="10" height="10" fill="#B4B4B4"/>
</svg>

After

Width:  |  Height:  |  Size: 205 B

View file

@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path d="M10.7 13.3L7.4 10L6 11.4L10.7 16.1L17.4 9.4L16 8L10.7 13.3Z"/>
</svg>

After

Width:  |  Height:  |  Size: 163 B

View file

@ -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"))
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
border.width: UM.Theme.getSize("default_lining").width
@ -418,11 +418,11 @@ QtObject
{
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
width: Math.round(parent.width / 2.5)
height: Math.round(parent.height / 2.5)
height: UM.Theme.getSize("checkbox_mark").height
width: UM.Theme.getSize("checkbox_mark").width
sourceSize.height: width
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("Check", "low")
opacity: control.checked
Behavior on opacity { NumberAnimation { duration: 100; } }
}
@ -460,8 +460,8 @@ QtObject
{
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
width: Math.round(parent.width / 2.5)
height: Math.round(parent.height / 2.5)
height: UM.Theme.getSize("checkbox_mark").height
width: UM.Theme.getSize("checkbox_mark").width
sourceSize.height: width
color: UM.Theme.getColor("checkbox_mark")
source:
@ -472,7 +472,7 @@ QtObject
}
else
{
return control.exclusiveGroup ? UM.Theme.getIcon("Dot", "low") : UM.Theme.getIcon("Check");
return control.exclusiveGroup ? UM.Theme.getIcon("Dot", "low") : UM.Theme.getIcon("Check", "low");
}
}
opacity: control.checked

View file

@ -350,11 +350,12 @@
"checkbox": [255, 255, 255, 255],
"checkbox_hover": [255, 255, 255, 255],
"checkbox_border": [199, 199, 199, 255],
"checkbox_border_hover": [50, 130, 255, 255],
"checkbox_border": [180, 180, 180, 255],
"checkbox_border_hover": [25, 110, 240, 255],
"checkbox_mark": [35, 35, 35, 255],
"checkbox_square": [180, 180, 180, 255],
"checkbox_disabled": [223, 223, 223, 255],
"checkbox_text": [35, 35, 35, 255],
"checkbox_text": [0, 12, 26, 255],
"tooltip": [25, 25, 25, 255],
"tooltip_text": [255, 255, 255, 255],
@ -607,8 +608,11 @@
"layerview_row": [11.0, 1.5],
"layerview_row_spacing": [0.0, 0.5],
"checkbox": [1.5, 1.5],
"checkbox_radius": [0.08, 0.08],
"checkbox": [1.33, 1.33],
"checkbox_mark": [1, 1],
"checkbox_square": [0.83, 0.83],
"checkbox_radius": [0.25, 0.25],
"checkbox_label_padding": [0.5, 0.5],
"tooltip": [20.0, 10.0],
"tooltip_margins": [1.0, 1.0],