use new expanded api

This commit is contained in:
Marco Martin 2023-06-09 10:27:11 +02:00
parent 1e3b4626e9
commit bc47ac3c42
4 changed files with 10 additions and 4 deletions

View file

@ -1,5 +1,5 @@
kpackage_install_package(package org.kde.kdeconnect plasmoids plasma NO_DEPRECATED_WARNING) kpackage_install_package(package org.kde.kdeconnect plasmoids plasma NO_DEPRECATED_WARNING)
install(FILES package/metadata.desktop #install(FILES package/metadata.desktop
DESTINATION ${KDE_INSTALL_KSERVICESDIR} # DESTINATION ${KDE_INSTALL_KSERVICESDIR}
RENAME plasma-kdeconnect.desktop) #RENAME plasma-kdeconnect.desktop)

View file

@ -24,9 +24,13 @@ DropArea {
MouseArea { MouseArea {
id: kdeConnectMouseArea id: kdeConnectMouseArea
anchors.fill: parent anchors.fill: parent
property bool wasExpanded
onPressed: {
wasExpanded = root.expanded;
}
onClicked: { onClicked: {
plasmoid.expanded = !plasmoid.expanded; root.expanded = !wasExpanded;
} }
} }

View file

@ -12,6 +12,7 @@ import org.kde.kdeconnect 1.0
PlasmoidItem PlasmoidItem
{ {
id: root
DevicesModel { DevicesModel {
id: connectDeviceModel id: connectDeviceModel
displayFilter: DevicesModel.Paired | DevicesModel.Reachable displayFilter: DevicesModel.Paired | DevicesModel.Reachable

View file

@ -1,4 +1,5 @@
{ {
"KPackageStructure": "Plasma/Applet",
"KPlugin": { "KPlugin": {
"Authors": [ "Authors": [
{ {