taskpanel: Also add margins when the buttons are on the side (landscape)

Otherwise they look rather grotesque
This commit is contained in:
Aleix Pol 2021-08-27 22:01:07 +02:00
parent 81a9b81e26
commit edcf70c263

View file

@ -66,9 +66,10 @@ Item {
}
PlasmaCore.IconItem {
id: icon
readonly property real side: Math.min(button.width, button.height)
anchors {
fill: parent
margins: button.width < button.height ? 0 : Math.round((parent.height - parent.height * iconSizeFactor * 0.6) / 2)
margins: Math.round((side - side * iconSizeFactor * 0.6) / 2)
}
colorGroup: PlasmaCore.ColorScope.colorGroup
//enabled: button.enabled && button.clickable