Ensure that the intent category names are displayed coorectly in recommended

CURA-6598
This commit is contained in:
Jaime van Kessel 2019-08-01 14:50:33 +02:00
parent 94c2211e7f
commit c51dfec29f

View File

@ -18,28 +18,12 @@ Item
property real settingsColumnWidth: width - labelColumnWidth property real settingsColumnWidth: width - labelColumnWidth
// Here are the elements that are shown in the left column // Here are the elements that are shown in the left column
Item
{
id: titleRow
width: labelColumnWidth
height: childrenRect.height
Cura.IconWithText
{
id: qualityRowTitle
source: UM.Theme.getIcon("category_layer_height")
text: catalog.i18nc("@label", "Profiles")
font: UM.Theme.getFont("medium")
anchors.left: parent.left
anchors.right: customisedSettings.left
}
}
Column Column
{ {
anchors anchors
{ {
left: titleRow.right left: parent.left
right: parent.right right: parent.right
} }
@ -53,29 +37,70 @@ Item
} }
Item
{
height: childrenRect.height
anchors
{
left: parent.left
right: parent.right
}
Cura.IconWithText
{
id: profileLabel
source: UM.Theme.getIcon("category_layer_height")
text: catalog.i18nc("@label", "Profiles")
font: UM.Theme.getFont("medium")
width: labelColumnWidth
}
Cura.LabelBar Cura.LabelBar
{ {
id: labelbar id: labelbar
anchors anchors
{ {
left: parent.left left: profileLabel.right
right: parent.right right: parent.right
} }
model: Cura.QualityProfilesDropDownMenuModel model: Cura.QualityProfilesDropDownMenuModel
modelKey: "layer_height" modelKey: "layer_height"
} }
}
Repeater Repeater
{ {
model: Cura.IntentCategoryModel{} model: Cura.IntentCategoryModel {}
Cura.RadioCheckbar Item
{ {
anchors anchors
{ {
left: parent.left left: parent.left
right: parent.right right: parent.right
} }
height: childrenRect.height
Label
{
id: intentCategoryLabel
text: model.name
width: labelColumnWidth - UM.Theme.getSize("section_icon").width
anchors.left: parent.left
anchors.leftMargin: UM.Theme.getSize("section_icon").width + UM.Theme.getSize("narrow_margin").width
font: UM.Theme.getFont("medium")
color: UM.Theme.getColor("text")
renderType: Text.NativeRendering
elide: Text.ElideRight
}
Cura.RadioCheckbar
{
anchors
{
left: intentCategoryLabel.right
right: parent.right
}
dataModel: model["qualities"] dataModel: model["qualities"]
buttonGroup: activeProfileButtonGroup buttonGroup: activeProfileButtonGroup
@ -91,6 +116,7 @@ Item
isCheckedFunction: checkedFunction isCheckedFunction: checkedFunction
} }
}
} }
} }