[applets/batterymonitor] Collapse inhibitions list properly

Authored by ngraham on May 6 2020, 2:47 AM.

Description

[applets/batterymonitor] Collapse inhibitions list properly

Summary:
I probably introduced the issue fixed here with D29315, sorry. This patch makes the
parent layout invisible when all of its children are invisible, so it doesn't keep
taking up some vertical space after a previously-visible inhibition goes away.

Test Plan: When an inhibition goes away, it once again looks like it should:

Reviewers: Plasma, broulik

Reviewed By: Plasma, broulik

Subscribers: plasma-devel

Tags: Plasma

Differential Revision: https://phabricator.kde.org/D29467