]> Pileus Git - ~andy/gtk/commit
Added logic to GtkScrolledWindow when allocating height-for-width children.
authorTristan Van Berkom <tristan.van.berkom@gmail.com>
Tue, 12 Oct 2010 08:16:32 +0000 (17:16 +0900)
committerTristan Van Berkom <tristan.van.berkom@gmail.com>
Tue, 12 Oct 2010 08:16:32 +0000 (17:16 +0900)
commite85dad38e2c579598c142515c8b816ea6657e0c8
tree13ba86bee3fcfca981813b290761ba2918661dda
parent0e0d938cc3e3a841d2a3849f2b67048265b799b6
Added logic to GtkScrolledWindow when allocating height-for-width children.

This patch makes the scrolled window reconsider allocating the child
the full width or height (depending on the child's request mode) without
a scrollbar. For instance when the child is height-for-width; the child
will first be tested if the content's height for full allocated width
(without a vscrollbar) will allow the contents height for that width
to fit the allocated height.

Patch is a simplified version of code inspected in st-scroll-view.c.
Note that this patch assumes children will begin to scroll only after
reaching their minimum size; adding a property to the future
GtkScrollableIface to decide whether to scroll-to-minimum or scroll-to-natural
will effect this code (it should then reconsider whether the child
will scroll below the natural size instead of the minimum).

Patch addresses bug 629778.
gtk/gtkscrolledwindow.c