mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-12-11 16:00:47 -07:00
Improved expansion behavior
Contributes to CURA-5682 - Active material is now expanded by default when opening the manager - Expanded and collapsed sections are saved to preferences - Sections are now highlighted when collapsed and having a selected material inside - Bug with losing focus between fields is not yet fixed
This commit is contained in:
parent
f1d2d7ed36
commit
9e56d6d29f
7 changed files with 119 additions and 34 deletions
|
|
@ -20,6 +20,12 @@ Rectangle
|
|||
height: UM.Theme.getSize("favorites_row").height
|
||||
width: parent.width
|
||||
color: base.currentItem == model ? UM.Theme.getColor("favorites_row_selected") : "transparent"
|
||||
|
||||
Component.onCompleted: {
|
||||
if (material.root_material_id == base.active_root_material_id) {
|
||||
base.currentItem = material
|
||||
}
|
||||
}
|
||||
|
||||
Item
|
||||
{
|
||||
|
|
@ -49,7 +55,11 @@ Rectangle
|
|||
MouseArea
|
||||
{
|
||||
anchors.fill: parent
|
||||
onClicked: { base.currentItem = material }
|
||||
onClicked: {
|
||||
base.currentItem = material
|
||||
base.current_brand = material.brand
|
||||
base.current_type = material.brand+"_"+material.material
|
||||
}
|
||||
hoverEnabled: true
|
||||
onEntered: { material_slot.hovered = true }
|
||||
onExited: { material_slot.hovered = false }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue