After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 348994 - Puts 22x22 icons into hicolor/24x24/apps and uses downscaled scalable icons for tray icon
Puts 22x22 icons into hicolor/24x24/apps and uses downscaled scalable icons f...
Status: RESOLVED NOTABUG
Product: gnome-power-manager
Classification: Deprecated
Component: gnome-power-manager
2.15.x
Other All
: Normal minor
: ---
Assigned To: GNOME Power Manager Maintainer(s)
GNOME Power Manager Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2006-07-27 21:27 UTC by Tobias Wolf
Modified: 2007-04-02 22:36 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16


Attachments
Fuzzy tray icon (264.88 KB, image/png)
2006-08-21 14:05 UTC, Tobias Wolf
Details

Description Tobias Wolf 2006-07-27 21:27:04 UTC
Please describe the problem:
The original Tango icon set includes the sizes 16x16, 22x2, 32x32 and scalable SVGs. To generate the 24x24 icons that are commonly used in GNOME they are enlarged with the command "convert -border 1x1 -bordercolor Transparent $icon-old $icon-new". This adds a build dependency for ImageMagick, however.
G-p-m skips this step and directly places the icons from the 22x22 folder in the source tarball into the 24x24 directory below the hicolor icon theme.
Additionally the notification area icon looks fuzzy because the scalable icons are used instead of the PNG files. If the scalable SVGs are deleted from hicolor/scalable/apps the tray icon looks crisp.

Steps to reproduce:


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Richard Hughes 2006-07-28 19:23:42 UTC
I doesn't look fuzzy to me, even when I go up to 32 size panel size. What is the proper way to fix this? Depend on imagemagik and install the 24px as well, or check the 24x24 icons into cvs?

Thanks.
Comment 2 Richard Hughes 2006-07-29 17:37:31 UTC
2006-07-29  Richard Hughes  <richard@hughsie.com>

	* configure.in:
	* data/icons/22x22/Makefile.am:
	Generate the 24x24 icons by using imagemagick to add a 1px border
	around the installed icons.
	This makes gnome generally happier, and should fix the fuzzyness for
	some people. Fixes #348994

Can you please check that this is fixed with the latest CVS. Many thanks.
Comment 3 Bastien Nocera 2006-08-10 08:59:39 UTC
Wouldn't it be better to not use imagemagick?
A simple C program using gdk-pixbuf would work just as well, and not add any dependency (I'll happily write it if you want).
Comment 4 Richard Hughes 2006-08-10 11:14:20 UTC
Bastien, Jon already complained about this. :-) I've checked the 24x24 icons into CVS and removed the imagemagick code as this made the build over complicated for little actual gain.
Thanks for the offer tho.

Richard.
Comment 5 Tobias Wolf 2006-08-21 14:05:00 UTC
Created attachment 71310 [details]
Fuzzy tray icon

I wonder whether my setup is borked in any way but I still get a fuzzy tray icon.
All sizes are present and g-p-m chooses downsample the svg instead of using the approriate icon size.

Feel free to reclose if you find this not reproducible.

NB: I purged g-p-m and rebuilt the icon cache to make sure it didn’t interfere. Platform is Ubuntu Edgy.
Comment 6 Richard Hughes 2006-08-22 17:36:17 UTC
What version gtk you use?
Comment 7 Rui Matos 2006-08-22 17:48:32 UTC
I also see this bug. gtk is version 2.10.2-0ubuntu1
Comment 8 Rui Matos 2006-08-22 17:49:52 UTC
Oh, and btw, a crisp icon (maybe 24x24) is selected when the panel size is increased from the standard 24 to 26.
Comment 9 Richard Hughes 2006-08-22 18:09:17 UTC
Does this happen with other applications?
Comment 10 Tobias Wolf 2006-08-22 18:13:26 UTC
(In reply to comment #7)
> I also see this bug. gtk is version 2.10.2-0ubuntu1

Dito here.

(In reply to comment #9)
> Does this happen with other applications?

No, not at all.
Comment 11 Rui Matos 2006-08-24 23:36:03 UTC
Richard:

I've been trying to understand this and I'm starting to think that the new gtk_status_icon is the culprit here.

The following code is a little program that creates an status icon with a gpm icon. On my 24 pixels panel it displays the svg scaled down just like gpm is doing. If I increase the panel size to 26 it will change just like the gpm one does to a properly sized icon (btw if you try it you'll notice a bug in the icons, I'll comment about it on bug #352416), then at panel size 34 they will change again to the svg but then I guess they look OK.

-----
#include <gtk/gtk.h>

int
main (int argc, char **argv)
{
        GtkStatusIcon *si;

        gtk_init (&argc, &argv);

        si = gtk_status_icon_new_from_icon_name ("gpm-keyboard-030");

        gtk_status_icon_set_visible (si, TRUE);

        g_printf ("%i\n", gtk_status_icon_get_size (si));

        gtk_main ();

        return 0;
}
-----

I tried calling gtk_status_icon_get_size() but that one always return 200 pixels regardeless of the panel size at the moment the program is launched which I think is bogus but then I don't know much about gtk.

That's all for now.
Comment 12 Rui Matos 2006-08-31 01:44:05 UTC
I've nailed this one and the good news is that it's not a bug in gnome-power-manager :-)

Ok, the problem (in ubuntu at least) is in the hicolor-icon-theme package version 0.9-0ubuntu4 which ships an index.theme like this:

...
[22x22/apps]
Size=22
Context=Applications
Type=Fixed <-- the culprit
...

changing to Type=Threshold (like all the other entries around there actually) and regenerating the theme cache solved the problem for me.
Comment 13 Rui Matos 2006-08-31 01:57:12 UTC
FYI I filled this on malone:
https://launchpad.net/distros/ubuntu/+source/hicolor-icon-theme/+bug/58287
Comment 14 Rui Matos 2006-08-31 10:30:41 UTC
Further investigations have puzzled me a bit. It seems that gnome-icon-theme, Tango and others really do use Type=Fixed on all sizes except for scalable and still their icons behave OK (tested with my little test app).

So, hicolor uses threshold all over the place and ubuntu changed that line to Fixed, but it still should work as Tango and other also use fixed for these sizes. It turns out that the difference is that the other themes use MinSize=32 for the scalable icons and hicolor uses MinSize=1, so changing this to 32 in the scalable/apps entry and returning to the Fixed Type in the 22x22/apps yelds correct results too.

Now, what is the correct fix? Revert the ubuntu change or fix hicolor's MinSize for scalables upstream? Should I file a bug in freedesktop's bugzilla?
Comment 15 Tobias Wolf 2006-08-31 10:38:37 UTC
Good catch, BTW.

I don’t know much about it but I’d say the latter, since, why should a scalable icon be used at lower sizes than 32x32? Tango and g-i-t even proceeded to have all icons prepared as PNGs in 32x32 because the scalables still suffer from scaling loss and artifacts at that size.
Comment 16 Richard Hughes 2006-08-31 20:10:37 UTC
Guys, thanks for looking into this, appreciated.
Comment 17 Richard Hughes 2006-09-12 14:40:39 UTC
Any ideas guys?
Comment 18 Richard Hughes 2006-10-10 19:59:39 UTC
This looks fixed in Ubuntu Edgy. Please re-open if you have more details.
Comment 19 Luca Cavalli 2007-04-02 22:04:36 UTC
I'm not reopenig the bug since it seems an Ubuntu issue, but it is still present in the upcoming Feisty (updated to 3rd of April, 2007). I tested also Rui's sample program with an icon from NetworkManager and it looks sharp in notification area, as it should be (so I think we can exclude a GtkStatusIcon bug).
Comment 20 Richard Hughes 2007-04-02 22:21:14 UTC
Luca, have you checked out comment 12?
Comment 21 Luca Cavalli 2007-04-02 22:36:30 UTC
Richard, tested rigth now :) Yes, this fixes the problem here too. Now I wonder why my index.theme was broken if Ubuntu package was fixed... Anyway thanks.