Skip to content

DRAFT: applets/batterymonitor: Show power profile badges on the icon if possible

Draft because:

  1. the Breeze Icons MR isn't done yet, and so the logic may still need to be adjusted here to account for different icon names.
  2. I'm still not 100% sure the logic here is correct; need to test it more.

Reason for the change

Currently we get complaints that the power profile icons sometimes replace the battery icons, obscuring the battery level and charging indicator.

This MR makes use of some new Breeze icons added in frameworks/breeze-icons!376 (merged) to show a badge of the current power profile in the corner of the battery icon when that profile is a non-default one (i.e. don't show the user their default power profile all the time; they already know what it is). This lets users see all relevant pieces of information at once, which is quite nice.

When using other icon themes lacking these new icons, the widget will fall back gracefully to only showing the battery icon and not showing the power profile icons at all. This is not a catastrophe IMO since that information is still available in the popup.

Test plan

On a system with batteries, change to a non-default power profile -> see the widget icon has become badged with a leaf or a lightning bolt.

Screenshots or screen recordings

Will add later once all the icons are in Breeze.

Bugs fixed

BUG: 483805 FIXED-IN: 6.2

Merge request reports

Loading