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

Bug #1324184 reported by Nick Dedekind
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu UI Toolkit
Fix Released
Medium
Lars Karlitski
ubuntu-ui-toolkit (Ubuntu)
Fix Released
Undecided
Unassigned
Vivid
New
Undecided
Unassigned

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".

Tags: icon

Related branches

Revision history for this message
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.

Revision history for this message
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.

Revision history for this message
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.

Revision history for this message
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)
Changed in ubuntu-ui-toolkit:
status: New → Confirmed
Lars Karlitski (larsu)
no longer affects: indicator-sound
Changed in ubuntu-ui-toolkit:
status: Confirmed → In Progress
assignee: nobody → Lars Uebernickel (larsu)
Revision history for this message
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)
Changed in ubuntu-ui-toolkit:
status: Fix Committed → Fix Released
Zsombor Egri (zsombi)
Changed in ubuntu-ui-toolkit (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.