mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 15:55:53 +08:00
Fix issues in simulation view
- Correctly display text in LayerType dropdown menu - Use UM.Label component to reduce code duplication - Don't display QtControls default dropdown icon CURA-8684
This commit is contained in:
parent
b51c787f62
commit
200e4df025
@ -93,7 +93,8 @@ Cura.ExpandableComponent
|
|||||||
|
|
||||||
spacing: UM.Theme.getSize("layerview_row_spacing").height
|
spacing: UM.Theme.getSize("layerview_row_spacing").height
|
||||||
|
|
||||||
ListModel // matches SimulationView.py
|
// matches SimulationView.py
|
||||||
|
ListModel
|
||||||
{
|
{
|
||||||
id: layerViewTypes
|
id: layerViewTypes
|
||||||
}
|
}
|
||||||
@ -129,6 +130,8 @@ Cura.ExpandableComponent
|
|||||||
ComboBox
|
ComboBox
|
||||||
{
|
{
|
||||||
id: layerTypeCombobox
|
id: layerTypeCombobox
|
||||||
|
textRole: "text"
|
||||||
|
valueRole: "type_id"
|
||||||
width: parent.width
|
width: parent.width
|
||||||
model: layerViewTypes
|
model: layerViewTypes
|
||||||
visible: !UM.SimulationView.compatibilityMode
|
visible: !UM.SimulationView.compatibilityMode
|
||||||
@ -146,25 +149,7 @@ Cura.ExpandableComponent
|
|||||||
radius: UM.Theme.getSize("setting_control_radius").width
|
radius: UM.Theme.getSize("setting_control_radius").width
|
||||||
}
|
}
|
||||||
|
|
||||||
contentItem: Item
|
indicator: UM.RecolorImage
|
||||||
{
|
|
||||||
Label
|
|
||||||
{
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.leftMargin: UM.Theme.getSize("default_lining").width
|
|
||||||
anchors.right: downArrow.left
|
|
||||||
anchors.rightMargin: UM.Theme.getSize("default_lining").width
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
|
|
||||||
text: ladyerTypeCombobox.currentText
|
|
||||||
font: UM.Theme.getFont("default");
|
|
||||||
color: !enabled ? UM.Theme.getColor("setting_control_disabled_text") : UM.Theme.getColor("setting_control_text")
|
|
||||||
|
|
||||||
elide: Text.ElideRight
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
|
||||||
}
|
|
||||||
|
|
||||||
UM.RecolorImage
|
|
||||||
{
|
{
|
||||||
id: downArrow
|
id: downArrow
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
@ -179,6 +164,18 @@ Cura.ExpandableComponent
|
|||||||
|
|
||||||
color: UM.Theme.getColor("setting_control_button");
|
color: UM.Theme.getColor("setting_control_button");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
contentItem: UM.Label
|
||||||
|
{
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: UM.Theme.getSize("default_lining").width
|
||||||
|
anchors.right: downArrow.left
|
||||||
|
anchors.rightMargin: UM.Theme.getSize("default_lining").width
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|
||||||
|
text: layerTypeCombobox.currentText
|
||||||
|
elide: Text.ElideRight
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
onActivated:
|
onActivated:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user