simon-git: putty (main): Simon Tatham

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Tue Dec 21 10:59:28 GMT 2021


TL;DR:
  120723bf GTK: allow Event Log list box to grow vertically.

Repository:     https://git.tartarus.org/simon/putty.git
On the web:     https://git.tartarus.org/?p=simon/putty.git
Branch updated: main
Committer:      Simon Tatham <anakin at pobox.com>
Date:           2021-12-21 10:59:28

commit 120723bf4011f492163a489cb530c149d09c92cf
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=120723bf4011f492163a489cb530c149d09c92cf;hp=f91118780fc3f507355419662b5a00908da99c15
Author: Simon Tatham <anakin at pobox.com>
Date:   Tue Dec 21 10:53:41 2021 +0000

    GTK: allow Event Log list box to grow vertically.
    
    Now, when you resize the Event Log window, the list box grows in both
    directions. Previously, as a side effect of the Columns-based layout,
    it grew only horizontally.
    
    I've arranged this by adding an extra wrinkle to the Columns layout
    system, which allows you to tag _exactly one_ widget in the whole
    container as the 'vexpand' widget. When the Columns is size-allocated
    taller than its minimum height, the vexpand widget is given all the
    extra space.
    
    This technique ports naturally across all versions of GTK (since the
    hard part is done in my own code). But it's limited: you can't set
    more than one widget to be vexpand (which saves having to figure out
    whether they're side by side and can expand in parallel, or vertically
    separated and each have to get half the available extra space, etc).
    And in complex layouts where the widget you really want to expand is
    in a sub-Columns, there's no system for recursively searching down to
    find it.
    
    In other words, this is a one-shot bodge for the Event Log, and it
    will want more work if we ever plan to extend it to list boxes in the
    main config dialog.

 unix/columns.c | 29 +++++++++++++++++++++++++++--
 unix/columns.h |  2 ++
 unix/dialog.c  |  4 ++++
 3 files changed, 33 insertions(+), 2 deletions(-)



More information about the tartarus-commits mailing list