Make all text fields use updated background and lining style.

CURA-8688
This commit is contained in:
j.delarago 2022-03-01 10:20:39 +01:00
parent 8dde0f4fd2
commit 195278aa55
2 changed files with 8 additions and 11 deletions

View file

@ -83,13 +83,12 @@ UM.TooltipArea
height: numericTextFieldWithUnit.controlHeight height: numericTextFieldWithUnit.controlHeight
// Background is a rounded-cornered box with filled color as state indication (normal, warning, error, etc.) // Background is a rounded-cornered box with filled color as state indication (normal, warning, error, etc.)
background: Rectangle background: UM.UnderlineBackground
{ {
anchors.fill: parent anchors.fill: parent
anchors.margins: Math.round(UM.Theme.getSize("default_lining").width) anchors.margins: Math.round(UM.Theme.getSize("default_lining").width)
radius: UM.Theme.getSize("setting_control_radius").width
border.color: liningColor:
{ {
if (!textFieldWithUnit.enabled) if (!textFieldWithUnit.enabled)
{ {
@ -108,9 +107,9 @@ UM.TooltipArea
// Validation is OK. // Validation is OK.
if (textFieldWithUnit.hovered || textFieldWithUnit.activeFocus) if (textFieldWithUnit.hovered || textFieldWithUnit.activeFocus)
{ {
return UM.Theme.getColor("setting_control_border_highlight") return UM.Theme.getColor("border_main_light")
} }
return UM.Theme.getColor("setting_control_border") return UM.Theme.getColor("border_field_light")
} }
color: color:

View file

@ -26,15 +26,13 @@ SettingItem
} }
} }
contents: Rectangle contents: UM.UnderlineBackground
{ {
id: control id: control
anchors.fill: parent anchors.fill: parent
radius: UM.Theme.getSize("setting_control_radius").width liningColor:
border.width: UM.Theme.getSize("default_lining").width
border.color:
{ {
if(!enabled) if(!enabled)
{ {
@ -54,9 +52,9 @@ SettingItem
//Validation is OK. //Validation is OK.
if(hovered || input.activeFocus) if(hovered || input.activeFocus)
{ {
return UM.Theme.getColor("setting_control_border_highlight") return UM.Theme.getColor("border_main_light")
} }
return UM.Theme.getColor("setting_control_border") return UM.Theme.getColor("border_field_light")
} }
color: { color: {