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 473482 - GtkStatusIcons are cropped on small sizes
GtkStatusIcons are cropped on small sizes
Status: RESOLVED WONTFIX
Product: gtk+
Classification: Platform
Component: Widget: GtkStatusIcon
2.90.x
Other All
: Normal minor
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2007-09-04 08:37 UTC by Nick Schermer
Modified: 2014-08-30 05:20 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Patch again gtkstatusicon.c (2.74 KB, patch)
2007-09-04 08:39 UTC, Nick Schermer
reviewed Details | Review

Description Nick Schermer 2007-09-04 08:37:34 UTC
Please describe the problem:
Especially on smaller tray sizes, the icons are chopped. After some testing, it look like using gtk_icon_theme_load_icon works better in those cases. As a result the icons are a bit fuzzy sometimes, but personally I think that's better then cropped icons.

Steps to reproduce:


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Nick Schermer 2007-09-04 08:39:23 UTC
Created attachment 94906 [details] [review]
Patch again gtkstatusicon.c

This patch shows the changes need in gtk, I haven't tried it inside gtk, only on the size-change signal of a status icon.
Comment 2 Baptiste Mille-Mathias 2008-02-09 21:03:08 UTC
Hello gtk developper,

could you look at the patch ?

Thanks
Comment 3 Björn Lindqvist 2008-04-27 01:05:21 UTC
Good patch! But could use some more work:

+    if (G_LIKELY (gtk_widget_has_screen (priv->image)))
+        icon_theme = gtk_icon_theme_get_for_screen (gtk_widget_get_screen (priv->image));
+    else
+        icon_theme = gtk_icon_theme_get_default ();

Instead use gtk_icon_theme_get_for_screen (gtk_status_icon_get_screen (status_icon)). The two chunks of code you are inserting are identical, so it makes sense to break it out into a function. As a last refactoring you could also try and unify the parts of the paths for X11, WIN32 and QUARTZ since with your patch they become very similar.
Comment 4 Javier Jardón (IRC: jjardon) 2010-06-09 17:36:29 UTC
@Nick:

Could you update your patch with the Björn comments?
Comment 5 Matthias Clasen 2014-08-30 05:20:10 UTC
GtkStatusIcon has been deprecated