On Ubuntu Desktop, the icon theme used by Qt is always 'gnome' (instead of the user set one)

Bug #1098578 reported by Christian Dywan on 2013-01-11
28
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Ubuntu UI Toolkit
Fix Released
High
Florian Boucault
ubuntu-system-settings (Ubuntu)
Undecided
Unassigned

Bug Description

I'm trying to use gicon-provider to show a list of files and folders - but many icons don't work despite the correct names.

Works:
Image { source: "image://gicon/text-x-preview"; sourceSize.width: units.gu(7); sourceSize.height: units.gu(7) }

“Failed to get image from provider”:
Image { source: "image://gicon/text-x-python"; sourceSize.width: units.gu(7); sourceSize.height: units.gu(7) }
Image { source: "image://gicon/folder"; sourceSize.width: units.gu(7); sourceSize.height: units.gu(7) }
Image { source: "image://gicon/inode-directory"; sourceSize.width: units.gu(7); sourceSize.height: units.gu(7) }
Image { source: "image://gicon/drive-harddisk"; sourceSize.width: units.gu(7); sourceSize.height: units.gu(7) }

Gerry Boland (gerboland) wrote :

<renato> timp, I believe this is not a bug, these icons does not exists in the hicolor icon theme
<renato> timp, the solution is add these icons in the ubuntu-mobile theme or use a alternative icon

Christian Dywan (kalikiana) wrote :

I verified that these icons exist in Humanity, the default Ubuntu icon theme. Assuming image://gicon behaves according to the icon naming spec all that's needed is a complete theme.

Changed in ubuntu-ui-toolkit:
assignee: nobody → Tim Peeters (tpeeters)
Tim Peeters (tpeeters) on 2013-04-11
Changed in ubuntu-ui-toolkit:
assignee: Tim Peeters (tpeeters) → Florian Boucault (fboucault)
Florian Boucault (fboucault) wrote :

The default Ubuntu icon theme is ubuntu-mono-dark on the desktop and ubuntu-mobile on Ubuntu Touch.

Changed in ubuntu-ui-toolkit:
status: New → Incomplete
Christian Dywan (kalikiana) wrote :

grep Inherits /usr/share/icons/ubuntu-mono-dark/index.theme
Inherits=Humanity-Dark,gnome,hicolor

Changed in ubuntu-ui-toolkit:
status: Incomplete → New
Florian Boucault (fboucault) wrote :

It actually works here. Do you have libqt5svg5 installed?
Can you post your test QML code?

Christian Dywan (kalikiana) wrote :

With latest packages, only one of the above icons still fails:

QML QQuickImage: Failed to get image from provider: image://gicon/text-x-python

Attached are the same examples, wrapped in a Row.

Christian Dywan (kalikiana) wrote :

And yes, libqt5svg5 is there - it's required by qtdeclarative5-ubuntu-ui-toolkit-plugin.

Florian Boucault (fboucault) wrote :

It looks like Qt does not pick up the current theme ("ubuntu-mono-dark") and falls back on "gnome" instead. The output of QIcon::themeNames() is "" for me.

Florian Boucault (fboucault) wrote :
Florian Boucault (fboucault) wrote :

Test program to verify the theme name returned by QIcon::themeName().

To compile and execute:
qmake && make && ./icontest

Florian Boucault (fboucault) wrote :
summary: - gicon-provider doesn't load all SVG images
+ On Ubuntu Desktop, the icon theme used by Qt is always 'gnome' (instead
+ of the user set one)
Changed in ubuntu-ui-toolkit:
status: New → Confirmed
importance: Undecided → High
Florian Boucault (fboucault) wrote :
Florian Boucault (fboucault) wrote :

Sound like Ubuntu desktop might get a QPA plugin:
https://blueprints.launchpad.net/appmenu-qt/+spec/qt5-qpa-appmenu

Maybe sane to plug the theme selection in there?

tags: added: desktop
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-system-settings - 0.1daily13.06.17-0ubuntu1

---------------
ubuntu-system-settings (0.1daily13.06.17-0ubuntu1) saucy; urgency=low

  [ Ken VanDine ]
  * Dropped the OnlyShowIn=Unity from the desktop file, unity8 doesn't
    show it .
  * about: Use text and unicode to create the Ubuntu logo .

  [ Sebastien Bacher ]
  * setings: set up for translations Use "ubuntu-system-settings" for
    the domain, better to namespace to avoid name conflicts since all
    the translation are installed in the same directory. The po.pro will
    make the translation be compiled and installed on build, there is
    also a "make pot" target to refresh the template. This commit also
    includes a first translation (fr.po) which was used to test that
    things are working correctly. .
  * settings: use the string capitalization style recommended by design
    Set some strings, like the vendor or model inforations, as not
    translatables since those should be local specific.
  * settings: make the plugin names translatable.
  * settings: update some icons with copies from design, we will replace
    those by theme icons once they are polished and included in the
    theme use a standard icon for the airplane-mode since it's already
    in theme .
  * settings: set the theme to ubuntu-mobile, until lp#1098578 is fixed,
    (toolkit not respecting the theme in use), recommends ubuntu-mobile-
    icons as well since we use icons shipped there. (LP: #1098578)

  [ Ubuntu daily release ]
  * Automatic snapshot from revision 56
 -- Ubuntu daily release <email address hidden> Mon, 17 Jun 2013 07:01:58 +0000

Changed in ubuntu-system-settings (Ubuntu):
status: New → Fix Released
tags: added: desktop-touch
removed: desktop
Dmitry Shachnev (mitya57) wrote :

This should have been fixed in Qt 5.1: https://codereview.qt-project.org/49387.

Is that still an issue with 5.1/5.2 packages?

Changed in ubuntu-ui-toolkit:
status: Confirmed → Incomplete
Changed in ubuntu-ui-toolkit:
milestone: none → february-2014
Tim Peeters (tpeeters) wrote :

We use the mobile icon theme by default now, see https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1284218

I think this bug can be closed.

Changed in ubuntu-ui-toolkit:
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers