diff --git a/plasmoid/package/contents/ui/CompactRepresentation.qml b/plasmoid/package/contents/ui/CompactRepresentation.qml index c814f7d0b..c4edb6d41 100644 --- a/plasmoid/package/contents/ui/CompactRepresentation.qml +++ b/plasmoid/package/contents/ui/CompactRepresentation.qml @@ -24,11 +24,6 @@ import org.kde.plasma.core 2.0 as PlasmaCore Item { id: view - //TODO: Use this to detect if we should be iconized or full size - function isConstrained() { - return (plasmoid.formFactor == Vertical || plasmoid.formFactor == Horizontal); - } - PlasmaCore.IconItem { id: icon source: "kdeconnect" diff --git a/plasmoid/package/contents/ui/FullRepresentation.qml b/plasmoid/package/contents/ui/FullRepresentation.qml index c788b41ef..87749bc7a 100644 --- a/plasmoid/package/contents/ui/FullRepresentation.qml +++ b/plasmoid/package/contents/ui/FullRepresentation.qml @@ -27,9 +27,6 @@ import org.kde.kdeconnect 1.0 as KdeConnect Item { id: kdeconnect - implicitWidth: 290 - implicitHeight: 340 - PlasmaComponents.Label { visible: devicesView.count==0 text: i18n("No paired devices available") diff --git a/plasmoid/package/contents/ui/main.qml b/plasmoid/package/contents/ui/main.qml index 744c697c9..bc584c349 100644 --- a/plasmoid/package/contents/ui/main.qml +++ b/plasmoid/package/contents/ui/main.qml @@ -23,8 +23,15 @@ import org.kde.plasma.plasmoid 2.0 Item { - Plasmoid.compactRepresentation: CompactRepresentation { } + width: units.gridUnit * 20 + height: units.gridUnit * 32 + + function isConstrained() { + return (plasmoid.formFactor == Vertical || plasmoid.formFactor == Horizontal); + } + + Plasmoid.compactRepresentation: CompactRepresentation {} Plasmoid.fullRepresentation: FullRepresentation {} - Plasmoid.preferredRepresentation: Plasmoid.fullRepresentation + Plasmoid.preferredRepresentation: isConstrained() ? Plasmoid.compactRepresentation : Plasmoid.fullRepresentation }