diff --git a/desktoppackage/contents/applet/DefaultCompactRepresentation.qml b/desktoppackage/contents/applet/DefaultCompactRepresentation.qml --- a/desktoppackage/contents/applet/DefaultCompactRepresentation.qml +++ b/desktoppackage/contents/applet/DefaultCompactRepresentation.qml @@ -23,6 +23,11 @@ PlasmaCore.IconItem { id: icon + readonly property bool inPanel: (plasmoid.location == PlasmaCore.Types.TopEdge + || plasmoid.location == PlasmaCore.Types.RightEdge + || plasmoid.location == PlasmaCore.Types.BottomEdge + || plasmoid.location == PlasmaCore.Types.LeftEdge) + Layout.minimumWidth: { switch (plasmoid.formFactor) { case PlasmaCore.Types.Vertical: @@ -45,6 +50,9 @@ } } + root.Layout.maximumWidth = inPanel ? units.iconSizeHints.panel : undefined; + root.Layout.maximumHeight = inPanel ? units.iconSizeHints.panel : undefined; + source: plasmoid.icon ? plasmoid.icon : "plasma" active: mouseArea.containsMouse