Re: size-request



Jamie Guinan wrote:

> 1. I connect to "size-request", and pass my preferred initial size the 
>    first time (the GtkDrawingArea is created that size), then 
>    {0,0} every successive time, which allows the window to be 
>    sized down.
> 
> 2. I connect to "size-allocate", and scale/crop the GtkDrawingArea 
>    contents in that handler.


Hi Jamie,

I solved this by subclassing DrawingArea, using _set_usize() to specify 
a default size, and overriding _configure() to detect size changes from 
enclosing widgets (such as window resize). I think this is maybe a 
little simpler, but I guess there's probably not much in it.

John



========================================================== 
Renaissance Autumn at the National Gallery 
A season of exhibitions, displays and events with a Renaissance theme. 

Pisanello: Painter to the Renaissance Court (24 October - 13 January 2002) 

For information and tickets: 
http://www.nationalgallery.org.uk/what/news/ren_autumn.htm



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