Re: Invisible GtkImage
- From: Kip Warner <kip thevertigo com>
- To: אנטולי קרס נר <tombackton gmail com>
- Cc: gtk-app-devel-list <gtk-app-devel-list gnome org>
- Subject: Re: Invisible GtkImage
- Date: Mon, 17 Jun 2013 19:32:09 -0700
On Mon, 2013-06-17 at 22:05 +0300, אנטולי קרסנר wrote:
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.
Hey Tom. Great idea. I definitely overlooked the small and obvious thing
this time. I totally forgot about the GtkAspectFrame. It makes a lot
more sense to use that in this case than going to all this trouble
subclassing GtkImage, overriding virtual methods, etc. So this is what I
came up with...
<http://pastebin.com/jFCcWyig>
It works great, except for one thing. The GUI doesn't freeze thankfully,
but the image or aspect frame just keeps _growing_ and doesn't stop. I'm
guessing what's happening in the "draw" signal callback is I am resizing
the image widget, which in turn is resizing the AspectFrame widget,
which is in turn resizing the image widget, etc...
--
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]