Update gcode text area in machine settings to have new border highlighting style and background color.

Swapped out default Label for UM.Label so it is easier to change styling in the future.

CURA-8943
This commit is contained in:
j.delarago 2022-03-04 09:18:48 +01:00
parent 78331d8e2a
commit d1a42e4e77

View File

@ -35,23 +35,24 @@ UM.TooltipArea
watchedProperties: [ "value", "description" ] watchedProperties: [ "value", "description" ]
} }
Label // Title Label UM.Label
{ {
id: titleLabel id: titleLabel
anchors.top: parent.top anchors.top: parent.top
anchors.left: parent.left anchors.left: parent.left
font: UM.Theme.getFont("medium_bold") font: UM.Theme.getFont("medium_bold")
color: UM.Theme.getColor("text")
renderType: Text.NativeRendering
} }
Flickable Flickable
{ {
anchors.top: titleLabel.bottom anchors
anchors.topMargin: UM.Theme.getSize("default_margin").height {
anchors.bottom: parent.bottom top: titleLabel.bottom
anchors.left: parent.left topMargin: UM.Theme.getSize("default_margin").height
anchors.right: parent.right bottom: parent.bottom
left: parent.left
right: parent.right
}
ScrollBar.vertical: UM.ScrollBar {} ScrollBar.vertical: UM.ScrollBar {}
@ -78,10 +79,10 @@ UM.TooltipArea
background: Rectangle background: Rectangle
{ {
color: UM.Theme.getColor("main_background")
anchors.fill: parent anchors.fill: parent
anchors.margins: -border.width //Wrap the border around the parent. anchors.margins: -border.width //Wrap the border around the parent.
color: UM.Theme.getColor("detail_background")
border.color: border.color:
{ {
if (!gcodeTextArea.enabled) if (!gcodeTextArea.enabled)
@ -90,9 +91,9 @@ UM.TooltipArea
} }
if (gcodeTextArea.hovered || gcodeTextArea.activeFocus) if (gcodeTextArea.hovered || gcodeTextArea.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")
} }
border.width: UM.Theme.getSize("default_lining").width border.width: UM.Theme.getSize("default_lining").width
} }