XfceScaledImage in libxfce4panel or libxfce4ui

Nick Schermer nickschermer at gmail.com
Tue May 26 12:40:23 CEST 2009


2009/5/26 Brian J. Tarricone <bjt23 at cornell.edu>:
> 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.)

Well if you work the image in the right way, it works fine. There were
indeed some problems with the object in gui4, but the version in
libxfce4panel works better.

> 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.

That will basically result in the same problems as we have right now,
I'd rather trust the requisition/allocation of a widget then the
padding calculations you purposed.

So can I assume, if I keep XfceScaledImage, libxfce4panel is the
preferred place?

Nick



More information about the Xfce4-dev mailing list