! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
icons in menus blindy trusts size from icons dir name
Status:
RESOLVED: FIXED
Product:
Xfdesktop
Component:
General

Comments

Description Kevin Fenzi 2013-12-14 20:07:48 CET
Downstream related bug: 

https://bugzilla.redhat.com/show_bug.cgi?id=1040687

The speedcrunch package ships with a number of icons in icons dirs: 

-rw-r--r--    1 root    root                     4451 Nov  4  2009 /usr/share/icons/hicolor/16x16/apps/speedcrunch.png
-rw-r--r--    1 root    root                     4451 Nov  4  2009 /usr/share/icons/hicolor/24x24/apps/speedcrunch.png
-rw-r--r--    1 root    root                     4451 Nov  4  2009 /usr/share/icons/hicolor/32x32/apps/speedcrunch.png
-rw-r--r--    1 root    root                     4451 Nov  4  2009 /usr/share/icons/hicolor/48x48/apps/speedcrunch.png
-rw-r--r--    1 root    root                     4451 Nov  4  2009 /usr/share/icons/hicolor/64x64/apps/speedcrunch.png

However, they are all in fact the same icon that is 48x48. 

When shown in the menus Xfce uses the 16x16 one and seems to trust that its the right size, but in fact it's not and that icon shows very large. If you remove all of them except the actual 48x48 one, scaling is done correctly and the icon is shown correctly. 

Perhaps add a check that the image is actually the size it claims from the directory name before using, then if it lies, scale?
Comment 1 Eric Koegel editbugs 2013-12-15 10:32:56 CET
Created attachment 5261 
Scale down oversize icons in menus

Can you test out the patch and verify it does fix the issue for you? It should also fix the XPM menu icon scaling issue as well.
Comment 2 Cristian Ciupitu 2013-12-15 14:23:13 CET
I don't know from where is the code from the patch, but please note that the menu from a panel behaves correctly (see screenshots from the original bug report).
Comment 3 Olivier Duchateau 2013-12-17 20:39:29 CET
(In reply to Eric Koegel from comment #1)
> Created attachment 5261 
> Scale down oversize icons in menus
> 
> Can you test out the patch and verify it does fix the issue for you? It
> should also fix the XPM menu icon scaling issue as well.

Eric, your patch fixes bug #10461. Thanks
Comment 4 Eric Koegel editbugs 2013-12-19 17:41:29 CET
Thanks for testing it! Pushed to master: http://git.xfce.org/xfce/xfdesktop/commit/?id=596ac7b07939b3b93c6253b2db704a91e68e75d0

Cristian, I did read the downstream Redhat report. The panel and xfdesktop display the menu in slightly different ways, in the future it may be handled by the same library that generates the menus.

Closing bug report.

Bug #10545

Reported by:
Kevin Fenzi
Reported on: 2013-12-14
Last modified on: 2013-12-19

People

Assignee:
Eric Koegel
CC List:
3 users

Version

Version:
4.10.0

Attachments

Scale down oversize icons in menus (1.25 KB, patch)
2013-12-15 10:32 CET , Eric Koegel
no flags

Additional information