Re: [PATCH] Use GtkIconChooser for properties window



On Tue, 2005-11-01 at 02:58 +0100, Christian Neumair wrote:
> Am Montag, den 31.10.2005, 09:45 +0100 schrieb Alexander Larsson:
> > On Fri, 2005-10-28 at 14:15 +0200, Christian Neumair wrote:
> > > Am Dienstag, den 18.10.2005, 14:16 +0200 schrieb Alexander Larsson:
> > > > I like this, but I really think its a real regression from the current
> > > > dialog that you can't see the icon files while choosing. Choosing an
> > > > image by name is just not a very good way.
> > > >
> > > > How did it look with a preview?
> > > 
> > > The problem is that the dialog size goes crazy when the selected icon is
> > > very big. It can easily happen that it gets 1200 px wide or more if you
> > > accidentally select an image with a big width, for instance a high
> > > resolution photo.
> > 
> > Surely you show a scaled down version of the image, not the full image.
> 
> Yes, but for small images, you want to show the full version. I wonder
> whether there are any well-known algorithms available. Should we simply
> clamp between two widths, should we consult the screen width for the
> max. boundary?

Just pick a size for the preview widget, say 96x96 (which incidentally
is the thumbnail size nautilus uses). Then scale down all images that
don't fit, keeping the aspect ratio. For files smaller than the picked
size, center them in the widget.

Make sure you use gnome_thumbnail_scale_down_pixbuf() to scale down (at
least for large images). The normal pixbuf functions are very slow when
you scale down large amounts.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's an oversexed Jewish card sharp living undercover at Ringling Bros. 
Circus. She's a bloodthirsty hypochondriac bounty hunter trying to make a 
difference in a man's world. They fight crime! 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]