scrolledwindow: add ::max-content-width and -height properties

The GtkScrolledWindow has support to set the minimum content size (both
width and height) which controls the minimum space allocated, but does
not exposes any way to control the maximum size the content can grow.

After the introduction of GtkPopover, which always uses the minimum
size of it's children widgets, the lack of max-content-width and -height
properties became a concrete use case.

This patch introduces the GtkScrolledWindow::max-content-width and
-height properties. The properties will alter the minimum size of
the scrolled window, making it grow up to the set value. They also
respect the previously set ::min-content-width and -height.

https://bugzilla.gnome.org/show_bug.cgi?id=742281
This commit is contained in:
Georges Basile Stavracas Neto
2016-06-01 23:18:37 -03:00
parent bd86715ed3
commit 4e5ecb7052
2 changed files with 201 additions and 0 deletions

View File

@ -214,6 +214,17 @@ void gtk_scrolled_window_set_overlay_scrolling (GtkScrolledWindow *sc
GDK_AVAILABLE_IN_3_16
gboolean gtk_scrolled_window_get_overlay_scrolling (GtkScrolledWindow *scrolled_window);
GDK_AVAILABLE_IN_3_22
void gtk_scrolled_window_set_max_content_width (GtkScrolledWindow *scrolled_window,
gint width);
GDK_AVAILABLE_IN_3_22
gint gtk_scrolled_window_get_max_content_width (GtkScrolledWindow *scrolled_window);
GDK_AVAILABLE_IN_3_22
void gtk_scrolled_window_set_max_content_height (GtkScrolledWindow *scrolled_window,
gint height);
GDK_AVAILABLE_IN_3_22
gint gtk_scrolled_window_get_max_content_height (GtkScrolledWindow *scrolled_window);
G_END_DECLS