UnityThemeIconProvider: Icons fall back to lower priority themes before checking alternative names

Bug #1324184 reported by Nick Dedekind on 2014-05-28
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu UI Toolkit
Fix Released
Lars Karlitski
ubuntu-ui-toolkit (Ubuntu)

Bug Description

QIcon::fromTheme checks the ingerited/system theme for icons as well as the user theme.
Due to the way we split the icon name and check each icon separately, if we supply "audio-volume-high-panel,audio-volume-high" as the icon name, the icon that is returned will be "audio-volume-high-panel" if it is supplied by a lower inherited/system theme rather than checking if the actual theme contains "audio-volume-high".

Related branches

Michał Sawicz (saviq) wrote :

This affects the sound indicator on the desktop under suru theme, because the icon listed as the first one is present in the ubuntu-mono-dark theme, and that is selected, instead of going breadth-first and checking for other icons first, before falling to another theme.

Michał Sawicz (saviq) wrote :

A workaround for the indicator would be to supply the less common (or at least one that's provided in the suru theme) names first.

Lars Karlitski (larsu) wrote :

QIcon::fromTheme() doesn't support the "FindBestIcon" algorithm from the spec. It's not that hard to do, we could just put the icon finding logic into unitythemeiconprovider directly.

Tim Peeters (tpeeters) wrote :

Icon now takes this as image source:

       source: ready && width > 0 && height > 0 && icon.name ? "image://theme/%1".arg(icon.name) : ""

what would you propose?

tags: added: icon
Changed in ubuntu-ui-toolkit:
importance: Undecided → Medium
Michał Sawicz (saviq) on 2014-06-25
Changed in ubuntu-ui-toolkit:
status: New → Confirmed
Lars Karlitski (larsu) on 2014-08-25
no longer affects: indicator-sound
Changed in ubuntu-ui-toolkit:
status: Confirmed → In Progress
assignee: nobody → Lars Uebernickel (larsu)
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:ubuntu-ui-toolkit/staging at revision None, scheduled for release in ubuntu-ui-toolkit, milestone Unknown

Changed in ubuntu-ui-toolkit:
status: In Progress → Fix Committed
Zoltan Balogh (bzoltan) on 2014-10-01
Changed in ubuntu-ui-toolkit:
status: Fix Committed → Fix Released
Zsombor Egri (zsombi) on 2015-07-14
Changed in ubuntu-ui-toolkit (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers