Re: gtk_widget_set_size_request stopped working with GTK3
- From: Tristan Van Berkom <tristan upstairslabs com>
- To: mike_s <michael u santiago gmail com>
- Cc: gtk-devel-list gnome org
- Subject: Re: gtk_widget_set_size_request stopped working with GTK3
- Date: Thu, 24 Jul 2014 20:58:48 -0003
Hi Mike,
On Wed, Apr 16, 2014 at 11:25 PM, mike_s <michael u santiago gmail com>
wrote:
It's the same error I am experiencing when I am trying to make my
ListView
ctrl scrolled without using the ScrolledWindow. It works in GTK+2 but
really
not in GTK+3.
What I was trying to do is to request it to be smaller
... And this is precisely the issue.
With GTK+3 we enforce size request rules a little more strongly than we
did in GTK+2. A widget may not, under any circumstances, ever be
allocated a size which is LESS than the widget's original request.
The documentation of gtk_widget_set_size_request() does specify[0] this:
"Sets the minimum size of a widget; that is, the widget’s size
request
will be at least width by height . You can use this function to force
a widget to be larger than it normally would be."
If you need to force a widget to be smaller, then it needs to actually
request less space.
If what you need is a GtkScrolledWindow without scrollbars, you could
use a GtkViewport for this directly. The viewport will take care of
allocating enough space for the child widget's content while only
displaying the portion of the child that you want displayed (this can
be achieved by driving the GtkAdjustements which are associated to
the viewport).
Cheers,
-Tristan
[0]:https://developer.gnome.org/gtk3/stable/GtkWidget.html#gtk-widget-set-size-request
or else when the list
gets longer it force its self to show all the list out of boundary. I
notice
that when you didn't even try to resize the column you can still
change the
size of the window, but once you touch or chage any column's size,
the size
of the list adjust to the minimum size.
I wonder if this bug is already fix or have any solution for this
since this
post is quite late. Anyway, at this moment in my GTK+3 it still
doesn't
work.
--
View this message in context:
http://gtk.10911.n7.nabble.com/gtk-widget-set-size-request-stopped-working-with-GTK3-tp26274p84317.html
Sent from the Gtk+ - Dev - General mailing list archive at Nabble.com.
_______________________________________________
gtk-devel-list mailing list
gtk-devel-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]