mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-09 06:45:09 -06:00
Make sure the tool panel background is at least as wide as the active item
This prevents odd rendering issues when items are differently sorted. Contributes to #57
This commit is contained in:
parent
2486030584
commit
46cd9e081b
1 changed files with 2 additions and 2 deletions
|
@ -18,6 +18,7 @@ Item {
|
|||
id: activeItemBackground;
|
||||
|
||||
anchors.bottom: parent.bottom;
|
||||
anchors.bottomMargin: UM.Theme.sizes.default_margin.height;
|
||||
|
||||
width: UM.Theme.sizes.button.width;
|
||||
height: UM.Theme.sizes.button.height * 2;
|
||||
|
@ -59,7 +60,6 @@ Item {
|
|||
MouseArea {
|
||||
anchors.fill: parent;
|
||||
onClicked: parent.checked ? UM.Controller.setActiveTool(null) : UM.Controller.setActiveTool(model.id);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ Item {
|
|||
anchors.bottom: buttons.top;
|
||||
anchors.bottomMargin: UM.Theme.sizes.default_margin.height;
|
||||
|
||||
width: panel.item ? panel.width + 2 * UM.Theme.sizes.default_margin.width : 0;
|
||||
width: panel.item ? Math.max(panel.width + 2 * UM.Theme.sizes.default_margin.width, activeItemBackground.x + activeItemBackground.width) : 0;
|
||||
height: panel.item ? panel.height + 2 * UM.Theme.sizes.default_margin.height : 0;
|
||||
|
||||
opacity: panel.item ? 1 : 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue