diff --git a/declarativeimports/plasmacomponents/platformcomponents/touch/ToolButton.qml b/declarativeimports/plasmacomponents/platformcomponents/touch/ToolButton.qml index 502ceef43..6c82e2015 100644 --- a/declarativeimports/plasmacomponents/platformcomponents/touch/ToolButton.qml +++ b/declarativeimports/plasmacomponents/platformcomponents/touch/ToolButton.qml @@ -137,12 +137,14 @@ Item { Component { id: roundButtonComponent Item { + id: roundButtonDelegate + parent: delegate anchors.fill: parent property QtObject margins: QtObject { - property int left: width/8 - property int top: width/8 - property int right: width/8 - property int bottom: width/8 + property int left: delegate.width/8 + property int top: delegate.width/8 + property int right: delegate.width/8 + property int bottom: delegate.width/8 } Private.RoundShadow { id: roundShadow diff --git a/declarativeimports/plasmacomponents/qml/ToolButton.qml b/declarativeimports/plasmacomponents/qml/ToolButton.qml index f63130d7c..1e8f05eec 100644 --- a/declarativeimports/plasmacomponents/qml/ToolButton.qml +++ b/declarativeimports/plasmacomponents/qml/ToolButton.qml @@ -81,7 +81,7 @@ Item { property QtObject defaultAction - enabled: defaultAction==undefined||defaultAction.enabled + enabled: defaultAction == undefined || defaultAction.enabled implicitWidth: { if (label.paintedWidth == 0) { @@ -163,6 +163,7 @@ Item { Component { id: buttonComponent Item { + parent: delegate anchors.fill: parent property alias margins: surface.margins Private.ButtonShadow { @@ -190,12 +191,14 @@ Item { Component { id: roundButtonComponent Item { + id: roundButtonDelegate + parent: delegate anchors.fill: parent property QtObject margins: QtObject { - property int left: width/8 - property int top: width/8 - property int right: width/8 - property int bottom: width/8 + property int left: delegate.width/8 + property int top: delegate.width/8 + property int right: delegate.width/8 + property int bottom: delegate.width/8 } Private.RoundShadow { id: roundShadow