Commit 5126f17e authored by Konrad Materka's avatar Konrad Materka
Browse files

[applets/systemtray] Fix highlight when applet changes state with Keep Open

Fix bug, when highlight is not correctly updated, when selected applet
changes state but "Keep Open" (pin) is enabled.

BUG: 434879
FIXED-IN 5.22.0
parent 7e09d62c
......@@ -66,6 +66,26 @@ PlasmaCore.FrameSvgItem {
}
}
Connections {
target: systemTrayState.activeApplet
function onParentChanged() {
updateHighlightedItem();
}
}
Connections {
target: parent
function onWidthChanged() {
updateHighlightedItem();
}
function onHeightChanged() {
updateHighlightedItem();
}
}
function updateHighlightedItem() {
if (systemTrayState.expanded) {
if (systemTrayState.activeApplet && systemTrayState.activeApplet.parent.inVisibleLayout) {
......@@ -79,8 +99,9 @@ PlasmaCore.FrameSvgItem {
}
function changeHighlightedItem(nextItem) {
if (!highlightedItem) {
// do not animate the first appearance
// do not animate the first appearance
// or when size of parent (root) changes
if (!highlightedItem || (highlightedItem === nextItem && nextItem === parent)) {
animationEnabled = false;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment