lxqt / libqtxdg

Qt implementation of freedesktop.org xdg specs
https://lxqt.github.io
GNU Lesser General Public License v2.1
72 stars 35 forks source link

Problem loading `/usr/share/pixmaps/` icons #305

Closed isf63 closed 2 months ago

isf63 commented 2 months ago

I have htop installed and it provides /usr/share/pixmaps/htop.png for its icon. The .desktop file correctly has Icon=htop but the icon is never disaplyed.

Current Behavior
Possible Solution
Steps to Reproduce (for bugs)
  1. Install htop
  2. Verify desktop file /usr/share/applications/htop.desktop is correct
  3. Missing icon in PCManFM-Qt, application menus, and Runner
Context

This bug may affect other user applications

System Information
tsujan commented 2 months ago

Not reproducible.

Actually, I tested more: Since htop has an icon in the the Breeze icon theme (which my theme inherits), I created an htop1 desktop entry with /usr/share/pixmaps/htop1.png as its icon and put it inside ~/.local/share/applications/. It was shown correctly in pcmanfm-qt, lxqt-runner and Fancy Menu.

yan12125 commented 2 months ago

For the case of htop, /usr/share/icons/hicolor/scalable/apps/htop.svg is used, and Qt 6.7 cannot render it correctly: https://bugreports.qt.io/browse/QTBUG-123138

stefonarch commented 2 months ago

Here no issue too, qt version is 6.7.1-4 immagine
both are installed: /usr/share/pixmaps/htop.png and 'ls /usr/share/icons/hicolor/scalable/apps/htop.svg`.

I don't use usually it but if I open it from the menu I get an empty qterminal. EDIT: using gnome icon theme I get an empty entry too.

stefonarch commented 2 months ago

Only the icon in hicolor can't be rendered by lximage-qt:


$ locate htop|grep icon
/usr/share/icons/Papirus/16x16/apps/bashtop.svg
/usr/share/icons/Papirus/16x16/apps/htop.svg
/usr/share/icons/Papirus/22x22/apps/bashtop.svg
/usr/share/icons/Papirus/22x22/apps/htop.svg
/usr/share/icons/Papirus/24x24/apps/bashtop.svg
/usr/share/icons/Papirus/24x24/apps/htop.svg
/usr/share/icons/Papirus/32x32/apps/bashtop.svg
/usr/share/icons/Papirus/32x32/apps/htop.svg
/usr/share/icons/Papirus/48x48/apps/bashtop.svg
/usr/share/icons/Papirus/48x48/apps/htop.svg
/usr/share/icons/Papirus/64x64/apps/bashtop.svg
/usr/share/icons/Papirus/64x64/apps/htop.svg
/usr/share/icons/breeze/apps/48/htop.svg
/usr/share/icons/breeze-dark/apps/48/htop.svg
/usr/share/icons/hicolor/scalable/apps/htop.svg
isf63 commented 2 months ago

I use mate-icon-theme icons. Indeed it is the /hicolor/ icon that can't be rendered - sudo mv /usr/share/icons/hicolor/scalable/apps/htop.svg{,.tmp} and restarting Desktop, the /pixmaps/ icon is found and displayed correctly.

tsujan commented 2 months ago

So, this was about a regression in Qt6, not about /usr/share/pixmaps/. @yan12125, thanks for the link!

I can confirm the regression because my Qt5-based image viewer shows /usr/share/icons/hicolor/scalable/apps/htop.svg correctly, while lximage-qt can't show it.