Compare commits

...

1 commit

Author SHA1 Message Date
Jin Liu
93769a1161 applet: hide tray icon when device is paired but not connected
In this state, the user can do nothing in the applet. Hiding it
to unclutter the systray overflow.
2024-02-03 13:21:52 +08:00

View file

@ -21,6 +21,10 @@ PlasmoidItem
|| plasmoid.location == PlasmaCore.Types.BottomEdge || plasmoid.location == PlasmaCore.Types.BottomEdge
|| plasmoid.location == PlasmaCore.Types.LeftEdge) || plasmoid.location == PlasmaCore.Types.LeftEdge)
DevicesModel {
id: allDevicesModel
}
DevicesModel { DevicesModel {
id: connectDeviceModel id: connectDeviceModel
displayFilter: DevicesModel.Paired | DevicesModel.Reachable displayFilter: DevicesModel.Paired | DevicesModel.Reachable
@ -44,7 +48,7 @@ PlasmoidItem
Binding { Binding {
target: plasmoid target: plasmoid
property: "status" property: "status"
value: (connectDeviceModel.count > 0) ? PlasmaCore.Types.ActiveStatus : PlasmaCore.Types.PassiveStatus value: (connectDeviceModel.count > 0) ? PlasmaCore.Types.ActiveStatus : ((allDevicesModel.count === 0) ? PlasmaCore.Types.PassiveStatus : PlasmaCore.Types.HiddenStatus)
} }
fullRepresentation: FullRepresentation { fullRepresentation: FullRepresentation {