mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 08:26:07 +08:00
Ensure that the intent category names are displayed coorectly in recommended
CURA-6598
This commit is contained in:
parent
94c2211e7f
commit
c51dfec29f
@ -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,43 +37,85 @@ Item
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Cura.LabelBar
|
Item
|
||||||
{
|
{
|
||||||
id: labelbar
|
height: childrenRect.height
|
||||||
anchors
|
anchors
|
||||||
{
|
{
|
||||||
left: parent.left
|
left: parent.left
|
||||||
right: parent.right
|
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
|
||||||
|
}
|
||||||
|
|
||||||
model: Cura.QualityProfilesDropDownMenuModel
|
Cura.LabelBar
|
||||||
modelKey: "layer_height"
|
{
|
||||||
|
id: labelbar
|
||||||
|
anchors
|
||||||
|
{
|
||||||
|
left: profileLabel.right
|
||||||
|
right: parent.right
|
||||||
|
}
|
||||||
|
|
||||||
|
model: Cura.QualityProfilesDropDownMenuModel
|
||||||
|
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
|
||||||
}
|
}
|
||||||
dataModel: model["qualities"]
|
height: childrenRect.height
|
||||||
buttonGroup: activeProfileButtonGroup
|
|
||||||
|
|
||||||
function checkedFunction(modelItem)
|
Label
|
||||||
{
|
{
|
||||||
if(Cura.MachineManager.hasCustomQuality)
|
id: intentCategoryLabel
|
||||||
{
|
text: model.name
|
||||||
// When user created profile is active, no quality tickbox should be active.
|
width: labelColumnWidth - UM.Theme.getSize("section_icon").width
|
||||||
return false
|
anchors.left: parent.left
|
||||||
}
|
anchors.leftMargin: UM.Theme.getSize("section_icon").width + UM.Theme.getSize("narrow_margin").width
|
||||||
return Cura.MachineManager.activeQualityType == modelItem.quality_type && Cura.MachineManager.activeIntentCategory == modelItem.intent_category
|
font: UM.Theme.getFont("medium")
|
||||||
|
color: UM.Theme.getColor("text")
|
||||||
|
renderType: Text.NativeRendering
|
||||||
|
elide: Text.ElideRight
|
||||||
}
|
}
|
||||||
|
|
||||||
isCheckedFunction: checkedFunction
|
Cura.RadioCheckbar
|
||||||
|
{
|
||||||
|
anchors
|
||||||
|
{
|
||||||
|
left: intentCategoryLabel.right
|
||||||
|
right: parent.right
|
||||||
|
}
|
||||||
|
dataModel: model["qualities"]
|
||||||
|
buttonGroup: activeProfileButtonGroup
|
||||||
|
|
||||||
|
function checkedFunction(modelItem)
|
||||||
|
{
|
||||||
|
if(Cura.MachineManager.hasCustomQuality)
|
||||||
|
{
|
||||||
|
// When user created profile is active, no quality tickbox should be active.
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return Cura.MachineManager.activeQualityType == modelItem.quality_type && Cura.MachineManager.activeIntentCategory == modelItem.intent_category
|
||||||
|
}
|
||||||
|
|
||||||
|
isCheckedFunction: checkedFunction
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user