Skip to content

power: Make sure we fall back to the correct icon

Commit bd18313d changed to a new naming scheme for battery icons, and used to old icon names as fallback-icon-name for compatibility with older/other icon themes.

However that fallback code isn't working correctly, as GThemedIcon's default fallbacks will transform a name of battery-level-90-symbolic to a list of names:

  • battery-level-90-symbolic
  • battery-level-symbolic
  • battery-symbolic

The last one frequently exists, so instead of the intended fallback, we end up with a generic battery icon.

Address this by specifying the icon as GIcon instead of an icon-name, where we have more control over how the icon is resolved.

Fixes #1442 (closed)

Merge request reports