mirror of
https://gitlab.gnome.org/julianschacher/top-bar-organizer.git
synced 2025-10-27 15:19:09 +00:00
Fix: Keep hidden items hidden
This commit is contained in:
parent
39face9957
commit
470ebf761d
@ -124,6 +124,9 @@ class Extension {
|
|||||||
// Get the indicator container associated with the current role.
|
// Get the indicator container associated with the current role.
|
||||||
const associatedIndicatorContainer = Main.panel.statusArea[role].container;
|
const associatedIndicatorContainer = Main.panel.statusArea[role].container;
|
||||||
|
|
||||||
|
// Save whether or not the indicator container is visible.
|
||||||
|
const isVisible = associatedIndicatorContainer.visible;
|
||||||
|
|
||||||
associatedIndicatorContainer.get_parent().remove_child(associatedIndicatorContainer);
|
associatedIndicatorContainer.get_parent().remove_child(associatedIndicatorContainer);
|
||||||
if (box === "right") {
|
if (box === "right") {
|
||||||
// If the target panel box is the right panel box, insert the
|
// If the target panel box is the right panel box, insert the
|
||||||
@ -142,6 +145,11 @@ class Extension {
|
|||||||
} else {
|
} else {
|
||||||
panelBox.insert_child_at_index(associatedIndicatorContainer, i);
|
panelBox.insert_child_at_index(associatedIndicatorContainer, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Hide the indicator container again, if it wasn't visible.
|
||||||
|
if (!isVisible) {
|
||||||
|
associatedIndicatorContainer.hide();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// To handle the case, where the box order got set to a permutation
|
// To handle the case, where the box order got set to a permutation
|
||||||
// of an outdated box order, it would be wise, if the caller updated the
|
// of an outdated box order, it would be wise, if the caller updated the
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user