• Luca Bacci's avatar
    Request natural width in Gtk::ScrolledWindows for Gtk >= 3.22 (!39) · eeffd505
    Luca Bacci authored
    Before Gtk 3.22 GtkScrolledWindow propagated natural size to its
    Children and so on to descendants.  In Gtk 3.22 this was changed to
    always request the minimum size.  This was done because it is believed
    to be a safer default (gives a better behaviour) in case of dynamic
    content inside the scrolled window, that is, content that may change
    allocated size. [1][2][3]
    
    When the scrolled window content is not dynamic the natural size is
    preferable because it gives a better looking layout and without any
    downside.
    
    In the case of GParted content which is not dynamic, so request the
    scrolled windows to allocate children at natural sizes for Gtk >= 3.22.
    
    The benefits of natural size allocation are evident in presence of
    wrapping labels (for example inside the "Partition Info" dialog), that
    with the minimum size request likely end up taking a very small width.
    
    References:
    
    [1] Gtk commit from 2016-08-31:
        GtkScrolledWindow: Make propagation of natural child sizes optional
        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."
    
    [2] Gtk 3.22 Reference Documentation -
        gtk_scrolled_window_set_propagate_natural_width
        https://developer.gnome.org/gtk3/3.22/GtkScrolledWindow.html#gtk-scrolled-window-set-propagate-natural-width
    
    [3] Gtkmm 3.24 Gtk::ScrolledWindow Class Reference,
        set_propagate_natural_width() method
        https://developer.gnome.org/gtkmm/3.24/classGtk_1_1ScrolledWindow.html#a2d4cb945688ecb8739efd70b18742779
    
    [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 - Always request natural size inside Gtk::ScrolledWindow
    eeffd505
Name
Last commit
Last update
data Loading commit data...
doc Loading commit data...
help Loading commit data...
include Loading commit data...
lib Loading commit data...
m4 Loading commit data...
po Loading commit data...
src Loading commit data...
tests Loading commit data...
.gitignore Loading commit data...
.gitlab-ci.yml Loading commit data...
AUTHORS Loading commit data...
COPYING Loading commit data...
COPYING-DOCS Loading commit data...
ChangeLog Loading commit data...
HACKING Loading commit data...
Makefile.am Loading commit data...
NEWS Loading commit data...
README Loading commit data...
autogen.sh Loading commit data...
configure.ac Loading commit data...
gparted.appdata.xml.in Loading commit data...
gparted.desktop.in.in Loading commit data...
gparted.doap Loading commit data...
gparted.in Loading commit data...
logo.png Loading commit data...
org.gnome.gparted.policy.in.in Loading commit data...
testbuild.sh Loading commit data...