Remove function to reintroduce binding.

Also force max width to integer value and comment why there is a plain value like 0.7 in the code.
part of CURA-6862
This commit is contained in:
Remco Burema 2019-10-15 11:38:51 +02:00
parent ca21268a12
commit 71701f15cf

View file

@ -88,20 +88,15 @@ Item
Label Label
{ {
id: textLabel id: textLabel
text: qualityName() text: Cura.MachineManager.activeQualityDisplayNameMap["main"]
font: UM.Theme.getFont("default") font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text") color: UM.Theme.getColor("text")
Layout.margins: 0 Layout.margins: 0
Layout.maximumWidth: parent.width * 0.7 Layout.maximumWidth: Math.floor(parent.width * 0.7) // Always leave >= 30% for the rest of the row.
height: contentHeight height: contentHeight
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
renderType: Text.NativeRendering renderType: Text.NativeRendering
elide: Text.ElideRight elide: Text.ElideRight
function qualityName() {
var resultMap = Cura.MachineManager.activeQualityDisplayNameMap
return resultMap["main"]
}
} }
Label Label