panel icon resizing
Brian J. Tarricone
bjt23 at cornell.edu
Mon Apr 5 19:58:03 CEST 2004
hi all-
this is somewhat of a question for jasper, but i wouldn't mind the
chance to generate a little discussion...
the other night someone was complaining in #xfce that my desktop menu
plugin was causing the panel to increase in size when added. in
debugging the problem, i noticed that, when the panel is set to 'large',
some of the icons were rather small, while some were the 'correct' size.
i tracked this to a call to gdk_pixbuf_new_from_file() in panel/icons.c
that i had apparently missed when i was doing the theming conversion.
or perhaps i left it as-is on purpose; i don't remember. at any rate, i
changed it to use xfce_load_themed_icon() (note: that function first
checks for an absolute path and, if it finds one, falls back to
gdk_pixbuf_new_from_file()). the win here (IMO), is that you get a
properly-scaled icon, so all launcher icons are the same size (i.e., the
size of the panel). the downside is obvious - some smaller icons may
not scale upward so well, as jens pointed out to me earlier today in
#xfce-dev.
personally i think the icons should be scaled, and if some don't look
good when scaled upward, they should be replaced.
options:
1) keep the current behavior. all icons are scaled to the current panel
size.
2) go back to what was (may have been) the old behavior. load icons at
their native size (and presumably scale down if they are larger than the
panel).
3) *sigh* - provide a "scale launcher icons" pref.
thoughts?
-brian
More information about the Xfce4-dev
mailing list