mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 21:05:54 +08:00
Change the panelBorder rectangle anchor to the bottom for lower toolbar buttons.
This makes the panel grow upwards into clear space rather than downwards which is a problem when the Cura window height is restricted.
This commit is contained in:
parent
323d2d4019
commit
700533b4aa
@ -96,6 +96,8 @@ Item
|
|||||||
{
|
{
|
||||||
UM.Controller.setActiveTool(model.id);
|
UM.Controller.setActiveTool(model.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
base.state = (index < toolsModel.count/2) ? "anchorAtTop" : "anchorAtBottom";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -219,4 +221,33 @@ Item
|
|||||||
|
|
||||||
visible: toolHint.text != ""
|
visible: toolHint.text != ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
states: [
|
||||||
|
State {
|
||||||
|
name: "anchorAtTop"
|
||||||
|
|
||||||
|
AnchorChanges {
|
||||||
|
target: panelBorder
|
||||||
|
anchors.top: base.top
|
||||||
|
anchors.bottom: undefined
|
||||||
|
}
|
||||||
|
PropertyChanges {
|
||||||
|
target: panelBorder
|
||||||
|
anchors.topMargin: base.activeY
|
||||||
|
}
|
||||||
|
},
|
||||||
|
State {
|
||||||
|
name: "anchorAtBottom"
|
||||||
|
|
||||||
|
AnchorChanges {
|
||||||
|
target: panelBorder
|
||||||
|
anchors.top: undefined
|
||||||
|
anchors.bottom: base.top
|
||||||
|
}
|
||||||
|
PropertyChanges {
|
||||||
|
target: panelBorder
|
||||||
|
anchors.bottomMargin: -(base.activeY + UM.Theme.getSize("button").height)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user