Change the buildplate information to use a reusable component

Boy scouting.

Contributes to CURA-6025.
This commit is contained in:
Diego Prado Gesto 2018-12-19 09:49:12 +01:00
parent 77ede1ae6b
commit 382286509f

View file

@ -90,25 +90,13 @@ Button
height: childrenRect.height height: childrenRect.height
visible: configuration.buildplateConfiguration != "" visible: configuration.buildplateConfiguration != ""
UM.RecolorImage // Show the type of buildplate. The first letter is capitalized
{ Cura.IconWithText
id: buildplateIcon
anchors.left: parent.left
width: UM.Theme.getSize("main_window_header_button_icon").width
height: UM.Theme.getSize("main_window_header_button_icon").height
source: UM.Theme.getIcon("buildplate")
color: UM.Theme.getColor("text")
}
Label
{ {
id: buildplateLabel id: buildplateLabel
anchors.left: buildplateIcon.right source: UM.Theme.getIcon("buildplate")
anchors.verticalCenter: buildplateIcon.verticalCenter text: configuration.buildplateConfiguration.charAt(0).toUpperCase() + configuration.buildplateConfiguration.substr(1)
anchors.leftMargin: Math.round(UM.Theme.getSize("default_margin").height / 2) anchors.left: parent.left
text: configuration.buildplateConfiguration
renderType: Text.NativeRendering
color: UM.Theme.getColor("text")
} }
} }
} }