Use background instead of contentItem

This way the padding and such doesn't matter any more. And the original background disappears, which was unthemed and still behind the original contentItem.

Contributes to issue CURA-5876.
This commit is contained in:
Ghostkeeper 2018-11-27 13:08:41 +01:00
parent c6a9aca346
commit 89126c7323
No known key found for this signature in database
GPG key ID: 86BEF881AE2CF276

View file

@ -15,11 +15,8 @@ Button
signal activateConfiguration()
height: childrenRect.height
padding: 0 //Stupid QML button has spacing by default.
rightPadding: 0
leftPadding: 0
contentItem: Rectangle
background: Rectangle
{
height: childrenRect.height
color: parent.hovered ? UM.Theme.getColor("action_button_hovered") : UM.Theme.getColor("action_button")