[RoundButton] Fix binding loop in extraSpace property

This commit is contained in:
Nate Graham 2020-11-11 10:33:17 -07:00
parent 7b39642f29
commit d66afc1fd0

View File

@ -28,7 +28,7 @@ T.RoundButton {
contentItem: RowLayout {
// This is the spacing which will make the icon a square inscribed in the circle with an extra smallspacing of margins
readonly property int extraSpace: width/2 - width/2*Math.sqrt(2)/2 + units.smallSpacing
readonly property int extraSpace: implicitWidth/2 - implicitWidth/2*Math.sqrt(2)/2 + units.smallSpacing
PlasmaCore.IconItem {
Layout.preferredWidth: units.iconSizes.smallMedium
Layout.preferredHeight: units.iconSizes.smallMedium