Skip to content

applets/batterymonitor: Drop obsolete null check, and give it some decent default size

When standalone on a panel or on a desktop containment, the applet used implicit width for the popup's size. Interestingly, that implicit width was coming from a header with a list of inhibitions, and thus from their text labels. So everytime something started or stopped playing audio/video/etc, the popup resized horizontally by a random lot, and that was kinda annoying for no reason.

Don't trust implicit width anymore, but on the other hand do use implicit height. Reason why I flipped it like that are simple:

  • Implicit height does not change as much, just by 1 or 2 lines of text.
  • Inhibition list was shifting everything down a notch anyway, so nothing really changes.
  • Not using implicit height would result in either extra empty space or unnecessary scrollview.

Merge request reports