Just to make sure you checked the small things...

Did you try AspectFrame? IIRC that's exactly what it does: keeps the
ratio of the contained widget. IIRC, the Gnome Mines game (aka
minesweeper) uses this kind of container to keep the minefield view
square-shaped even when the window is stretched to different directions.
It fills the space, but without losing the ratio.

On ה', 2013-06-13 at 18:09 -0700, Kip Warner wrote:
> Hey list,
> 
> I am attempting to create a GtkImage that resizes to fill its parent
> container while maintaining its aspect ratio. I do this by subclassing
> GtkImage and overriding do_size_allocate().
> 
>         <http://pastebin.com/SD4RBkes>
> 
> The code mostly works in that I can see that the area the widget is
> taking appears to be the correct size as I resize its parent. However,
> the actual image pixels do not appear to be painted.
> 
> Any help appreciated,
> 


_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to