GNOME Bugzilla – Bug 747581
add a 'multi-paned' widget
Last modified: 2018-05-02 16:31:16 UTC
A wishlist item from Christian Hergert: For the editor layout in Builder, we use GtkPaned of GtkPaned (of GtkPaned). It's really annoying to manage. Additionally, it's hard to get them to always have homogenous sizing. I'd love something that is more like a GtkBox with handles inbetween them. 1px solid line with larger dead area for gripping would be nice. Additionally, a 2x2 paned might be interesting.
A nice prototype for this sort of widget is the PnlMultPaned in https://github.com/chergert/panel-gtk/
missing from the prototype: - smart resize behavior (first grow to natural size, then expand expandables) - rtl flipping - keynav - gesture handling like in GtkPaned - port to gadgets, drop style properties (can only be done in-tree) - might be nice to have a way to insert children in the middle - do we need the shrink child property from GtkPaned ?
I wanted to mention I have an implementation of 2x2 linked panes in pygtk3 here: https://github.com/thorsummoner/Gtk.PanedQuandrent Its not the primary interest of this thread but it is tangent. A solution built into the gtk library proper should be far more optimized than this, but may make some kind of starting point obvious.
Another issue with current paned design: - Evolution when my laptop is docked: http://i.imgur.com/xIFCY0m.png - Evolution when my laptop is not docked: http://i.imgur.com/I9h5B8R.png So, new paned widget need to allow dev to set position with percent: | Mailboxlist| Maibox list | Message view | | | | 10% | 30% | 60% | | | This will make applications ok with all resolutions.
(In reply to Cédric Bellegarde from comment #4) > Another issue with current paned design: > - Evolution when my laptop is docked: > http://i.imgur.com/xIFCY0m.png > - Evolution when my laptop is not docked: > http://i.imgur.com/I9h5B8R.png > > So, new paned widget need to allow dev to set position with percent: Percentages do not really work with the current size negotiation; the preferred size of the parent depends on the preferred size of each child.
Yeah, I was thinking the other day how nice it would be to have percentage support, but it'd require a comprehensive overhaul of how sizing works. Anyway, for anyone interested who doesn't already know, nowadays Christian's implementation lives in the extremely exciting libdazzle: https://git.gnome.org/browse/libdazzle/tree/src/widgets/dzl-multi-paned.c Here's hoping for lots of cool stuff from there getting upstreamed to GTK+ soon!
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gtk/issues/545.