-
Luca Bacci authored
Starting from Gtk 3.22 GtkScrolledWindow behaviour was changed to request the minimum size for its child by default [2]. An API was added to make it explicitely request the natural size [3]. This was done to have better support out of the box for dynamic content inside scrolled windows, that is, content that may change allocated size. When scrolled window content is not dynamic it is best to request the natural size, especially in presence of wrapping labels, that may otherwise end up taking a very small width. Explicitely request natural size allocation to Gtk::ScrolledWindow child when Gtk >= 3.22. References: [1] GNOME Bugzilla - Bug 766569 Better size requisition for GTK_SCROLL_NATURAL children https://bugzilla.gnome.org/show_bug.cgi?id=766569 [2] Gtk Commit - GtkScrolledWindow: Make propagation of natural child sizes optional GNOME/gtk@0984d162 "Making propagation of child natural sizes mandatory (or default, even) was evidently a mistake as this causes dynamic content in a scrolled window to resize it's parent when the scrolled window is competing for space with an adjacent widget." [3] Gtk 3.22 Reference Documentation - gtk_scrolled_window_set_propagate_natural_width/height() https://developer.gnome.org/gtk3/3.22/GtkScrolledWindow.html#gtk-scrolled-window-set-propagate-natural-width [4] Gtkmm 3.21.6 NEWS https://gitlab.gnome.org/GNOME/gtkmm/blob/3.21.6/NEWS "* ScrolledWindow: - Added get/set_propagate_natural_height/width() and the properties." Closes !39 - Use natural size in Gtk::ScrolledWindows