XfceScaledImage in libxfce4panel or libxfce4ui

Brian J. Tarricone bjt23 at cornell.edu
Tue May 26 09:31:43 CEST 2009


On 05/26/2009 12:10 AM, Nick Schermer wrote:
> Devs,
>
> For the new panel i've improved the XfceScaledImage widget so it's
> useable with icon-names and filenames. Now as you might know this
> widget is already in libxfcegui4, the question is do we move it to
> libxfce4ui or keep it in libxfce4panel. AFAIK it is only used by panel
> plugins atm, also in 4.6 and since we had to goal for libxfcegui4 to
> move all specific/spesialized widgets into the module, it makes sence
> not putting it in 4ui.
> Thoughts?

Honestly... neither.  It should be scrapped.  It's never worked properly 
and always requires some manual math for the sizing to work out 
correctly anyway.  It was a nice idea, but it just doesn't seem to work 
-- or even when it does work, it sizes the icons down smaller than they 
need to be.  (The menu plugin and mailwatch plugin don't use 
XfceScaledImage anymore because of just that.)

I'd say get rid of it and provide some convenience API in libxfce4panel 
to aid in sizing images.  You could do something like pass the container 
widget to the function, and it'll calculate the correct size based on 
the widget padding of the parents of that widget up to the GtkPlug and 
return the correct height (or width, for vertical panels) that the 
plugin should use when scaling the images.

	-b



More information about the Xfce4-dev mailing list