Re: [gtk-list] Re: scrolled image



Havoc Pennington wrote:

> alfio castorina <alfcastor@tin.it> writes:
> >
> > I have a scrolled window which displays an image inside a drawing area.
> > The adjustment policy is set to automatic in both directions.
> > When i load the image i set the size of the window equal to size of the
> > image but this causes the
> > scrollbars to appear and i'd like to avoid this.
> > How do i resize the window in a way that the image exactly fits in the
> > window?
> >  Should i know the width of the scrollbars? Is this possible?
> >
>
> I think the solution will be clear once you specify more precisely the
> user-visible behavior that you want to have.
>
> If you always set the window size to the image size, scrollbars are
> useless. So when do you want the scrollbars to appear?

I simple want to open the image and display the window without scrollbars
(if the image fits into the screen), letting then scrollbars appear when the
user resizes the window making it smaller then the image size.
I think its the standard behaviour of every image displayer.
Maybe, when i first open the image i could add some pixel displacement
taking into account the size of the scrollbars. But even if this would be
possibile , i think the results could be different depending on the window
manager and the themes used.

Thank you for your interest.


Alfio


>
>
> Most likely though, the problem is just that you need to set the
> window somewhat larger than the image.
>
> Havoc
>
> --
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null



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