diff --git a/kcm/package/contents/ui/RotationButton.qml b/kcm/package/contents/ui/RotationButton.qml --- a/kcm/package/contents/ui/RotationButton.qml +++ b/kcm/package/contents/ui/RotationButton.qml @@ -17,6 +17,7 @@ import QtQuick 2.9 import QtQuick.Layouts 1.1 import QtQuick.Controls 2.4 as Controls +import org.kde.kirigami 2.4 as Kirigami import org.kde.private.kcm.kscreen 1.0 as KScreen Controls.ToolButton { @@ -26,16 +27,28 @@ property var rot property var tooltip + property int iconSize: 64 + Layout.fillWidth: true height: childrenRect.height - icon.name: "view-preview" checked: element.rotation === rot Controls.ToolTip { text: tooltip } + contentItem: Kirigami.Icon { + source: "view-preview" + transform: Rotation { + origin { + x: width / 2 + y: height / 2 + } + angle: root.value + } + } + onClicked: { if (element.rotation === rot) { return; @@ -45,16 +58,9 @@ screen.resetTotalSize(); } - implicitWidth: 45 - implicitHeight: 45 + implicitWidth: contentItem.implicitWidth + 2 * 4 + implicitHeight: contentItem.implicitHeight + 2 * 4 - transform: Rotation { - origin { - x: root.width / 2 - y: root.height / 2 - } - angle: root.value - } Component.onCompleted: { switch(value) { case 90: