From bc47ac3c420b6ebcad5dec5a3fbc6349b994d187 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Fri, 9 Jun 2023 10:27:11 +0200 Subject: [PATCH] use new expanded api --- plasmoid/CMakeLists.txt | 6 +++--- plasmoid/package/contents/ui/CompactRepresentation.qml | 6 +++++- plasmoid/package/contents/ui/main.qml | 1 + plasmoid/package/metadata.json | 1 + 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/plasmoid/CMakeLists.txt b/plasmoid/CMakeLists.txt index 0afd2b39c..654dbb14d 100644 --- a/plasmoid/CMakeLists.txt +++ b/plasmoid/CMakeLists.txt @@ -1,5 +1,5 @@ kpackage_install_package(package org.kde.kdeconnect plasmoids plasma NO_DEPRECATED_WARNING) -install(FILES package/metadata.desktop - DESTINATION ${KDE_INSTALL_KSERVICESDIR} - RENAME plasma-kdeconnect.desktop) +#install(FILES package/metadata.desktop +# DESTINATION ${KDE_INSTALL_KSERVICESDIR} + #RENAME plasma-kdeconnect.desktop) diff --git a/plasmoid/package/contents/ui/CompactRepresentation.qml b/plasmoid/package/contents/ui/CompactRepresentation.qml index 91863a3f8..f6e9ecef5 100644 --- a/plasmoid/package/contents/ui/CompactRepresentation.qml +++ b/plasmoid/package/contents/ui/CompactRepresentation.qml @@ -24,9 +24,13 @@ DropArea { MouseArea { id: kdeConnectMouseArea anchors.fill: parent + property bool wasExpanded + onPressed: { + wasExpanded = root.expanded; + } onClicked: { - plasmoid.expanded = !plasmoid.expanded; + root.expanded = !wasExpanded; } } diff --git a/plasmoid/package/contents/ui/main.qml b/plasmoid/package/contents/ui/main.qml index d509a496d..aa770e143 100644 --- a/plasmoid/package/contents/ui/main.qml +++ b/plasmoid/package/contents/ui/main.qml @@ -12,6 +12,7 @@ import org.kde.kdeconnect 1.0 PlasmoidItem { + id: root DevicesModel { id: connectDeviceModel displayFilter: DevicesModel.Paired | DevicesModel.Reachable diff --git a/plasmoid/package/metadata.json b/plasmoid/package/metadata.json index 518fc9925..e90e26f83 100644 --- a/plasmoid/package/metadata.json +++ b/plasmoid/package/metadata.json @@ -1,4 +1,5 @@ { + "KPackageStructure": "Plasma/Applet", "KPlugin": { "Authors": [ {