Re: Widget sizing?



On Thu, 2014-11-13 at 11:23 -0600, The Devils Jester wrote:
In a nutshell I am (more or less) trying to simulate a vertical layout
manager using a GtkFixed layout manager. I have specific need to do this,
rather than just use the Gtk provided one.

If you need a kind of container that GTK+ does not provide, you really
should just subclass GtkContainer and implement the size requesting
and size allocation methods.

Trying to simulate it using a GtkFixed and setting size requests might
seem tempting, but just wont get you what you want, if what you want
is content driven size allocations (you will find yourself in a catch 22
very quickly, where the size you previously forced on a child is
reported when you ask for it's new size, hence you can never know what
it's new requested size might be, because you already forced it
explicitly).

Best,
    -Tristan


The problem occurs when I have to resize a widget in the GtkFixed
container.  The function I am using for this is
gtk_widget_set_size_request.  The widget resizes (in this case it stretches
to fit the "container size"), but then the window can never be resized to
smaller than the widget size.   I can make the window larger (which makes
the container larger, which makes the widget larger) but I can never make
the window smaller because the size request holds it to a minimum size.

How can I resize the widget in a way that the window will ignore its size
when calculating the minimum window size?
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list




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