Replace material sub-menus with custom Popup

The sub-menus were giving segfaults for some reason. We couldn't figure out how to circumvent that. So now we're at a last resort: Implement the whole thing ourselves, but with Popup instead of Menu.

Contributes to issue CURA-8640.
This commit is contained in:
Ghostkeeper 2022-04-08 11:57:03 +02:00
parent 4abdd675f6
commit 11b557b3d9
No known key found for this signature in database
GPG key ID: D2A8871EE34EC59A
3 changed files with 108 additions and 38 deletions

View file

@ -16,9 +16,11 @@ UM.MenuItem
implicitHeight: UM.Theme.getSize("menu").height + UM.Theme.getSize("narrow_margin").height
implicitWidth: UM.Theme.getSize("menu").width
property bool overrideShowArrow: false
arrow: UM.RecolorImage
{
visible: menuItem.subMenu
visible: menuItem.subMenu || overrideShowArrow
height: UM.Theme.getSize("default_arrow").height
width: height
anchors.verticalCenter: parent.verticalCenter