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 335582 - Show Desktop Button Icon gets scaled
Show Desktop Button Icon gets scaled
Status: RESOLVED FIXED
Product: gnome-panel
Classification: Other
Component: show-desktop-button
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Panel Maintainers
Panel Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-03-22 21:42 UTC by Rodney Dawes
Modified: 2006-08-08 18:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to fix scaling of show desktop icon (584 bytes, patch)
2006-03-22 21:44 UTC, Rodney Dawes
none Details | Review

Description Rodney Dawes 2006-03-22 21:42:45 UTC
The icon in the show desktop button is getting scaled. This makes the icon blurry and not look as nice as it could. The attached patch fixes this issue.
Comment 1 Rodney Dawes 2006-03-22 21:44:05 UTC
Created attachment 61797 [details] [review]
Patch to fix scaling of show desktop icon

This patch increases the default allotment for the button border, so that a better icon size gets selected, and we avoid scaling.
Comment 2 Vincent Untz 2006-03-25 08:05:21 UTC
To be honest, I don't see much of a difference here (except that we're getting a smaller icon on a 24px panel) :-) With what size and icon theme are you testing?
Comment 3 Rodney Dawes 2006-03-25 16:38:12 UTC
I'm testing on a 24px panel with the GNOME and Tango themes, and the icon is blurry, meaning that it's getting scaled. 
Comment 4 Rodney Dawes 2006-04-11 23:16:56 UTC
So, can we commit this?
Comment 5 Vincent Untz 2006-04-15 08:21:24 UTC
Please bear with me: I'm trying to understand...

I have a 24px panel. This means the applet requests an icon of 24-4 = 20px. There are a 16px and a 24px icon.

Isn't the issue here that GTK+ returns the 24px one?
Comment 6 Rodney Dawes 2006-04-15 14:26:58 UTC
Not exactly. If it returned the 16px one, for 20px, and it got scaled up, it would look much worse. The real problem is that scaling is occuring regardless of whether or not the icon theme says the icons are Fixed, I guess. However, there are so many places in the code path where this could be happening, that it's hard to determine where exactly it is happening, in a lot of situations. And, it's basically impossible to guarantee that all possible applications that use the icon theme, will never scale the icons, as anyone could get the icon at native size, and then just use the scaling methods to scale it, outside the icon theme implementation.

I think if we set the border to 2 or 0, we'll end up with the problem being that the icon gets clipped again. Unfortunately, for a panel that is less than 24px tall, this means that the icon still gets scaled, with this patch. 
Comment 7 Vincent Untz 2006-04-17 14:39:27 UTC
But your patch means that it will only work for panels with a size that is "size of an icon" + 8. Eg, it won't work for 48px panels. Or 26px. Or...
Comment 8 Rodney Dawes 2006-04-17 14:57:48 UTC
Working for the majority of cases (24px, the default size), is better than working for oddly sized cases, I think. The fact that the icon is inside of a GtkButton makes this rather problematic. Perhaps the show desktop button needs to be changed to match the behavior of Log Out, Lock Screen, etc... which look like launchers, and we could just drop the specialized icon code for it, and take advantage of the launcher widget icon stuff, which handles the panel sizes better.
Comment 9 Rodney Dawes 2006-07-10 19:26:04 UTC
Vincent? Poke? So, can we get this patch in?
Comment 10 Vincent Untz 2006-08-08 18:12:23 UTC
I fixed this the correct way.

2006-08-08  Vincent Untz  <vuntz@gnome.org>

	* showdesktop.c: (applet_size_allocated): renamed to
	button_size_allocated()
	(update_icon): take into account the focus width and focus pad and
	thickness of the button to calculate the icon size
	also, force the icon size to be 16, 22 or 32 if it's < 22, < 32 and
	< 48
	(show_desktop_applet_fill): connect to the size_allocate signal of the
	button, and not of the applet
	Fix bug #335582