diff --git a/applets/systemtray/container/package/contents/ui/main.qml b/applets/systemtray/container/package/contents/ui/main.qml --- a/applets/systemtray/container/package/contents/ui/main.qml +++ b/applets/systemtray/container/package/contents/ui/main.qml @@ -32,6 +32,16 @@ Plasmoid.preferredRepresentation: Plasmoid.fullRepresentation Plasmoid.status: internalSystray ? internalSystray.status : PlasmaCore.Types.UnknownStatus + Plasmoid.onExpandedChanged: { + if (internalSystray && !plasmoid.expanded) { + internalSystray.expanded = false; + } + } + Connections { + target: internalSystray + onExpandedChanged: plasmoid.expanded = internalSystray.expanded + } + property Item internalSystray Component.onCompleted: { diff --git a/applets/systemtray/package/contents/ui/main.qml b/applets/systemtray/package/contents/ui/main.qml --- a/applets/systemtray/package/contents/ui/main.qml +++ b/applets/systemtray/package/contents/ui/main.qml @@ -52,6 +52,12 @@ property Component plasmoidItemComponent + Plasmoid.onExpandedChanged: { + if (!plasmoid.expanded) { + dialog.visible = plasmoid.expanded; + } + } + function updateItemVisibility(item) { switch (item.effectiveStatus) { case PlasmaCore.Types.HiddenStatus: @@ -344,6 +350,7 @@ } else { plasmoid.status = PlasmaCore.Types.RequiresAttentionStatus; } + plasmoid.expanded = visible; } mainItem: ExpandedRepresentation { id: expandedRepresentation