Re: Giving GtkPane more than 2 children?
- From: Christian Hergert <christian hergert me>
- To: Paul Davis <paul linuxaudiosystems com>
- Cc: Ryan Gonzalez <rymg19 gmail com>, gtk-devel-list <gtk-devel-list gnome org>
- Subject: Re: Giving GtkPane more than 2 children?
- Date: Fri, 11 May 2018 17:07:47 -0700
On 05/11/2018 01:57 PM, Paul Davis wrote:
Does your new pane correctly restore the divider positions? The existing
GtkPane fails to be able to restore the pane divider position precisely.
The reasons why are fairly obvious once you dive into the code. I wrote
a new (GTK+2) pane widget for Ardour, too.
The allocations are distributed in a series of stages that allow us to
prioritize what matters.
https://gitlab.gnome.org/GNOME/libdazzle/blob/master/src/widgets/dzl-multi-paned.c#L198
It only "pins" a value between two children when the user manually drags
a handle. Everything else is handled appropriately given the features we
have available to us in gtk3 (natural sizes, HfW/WfH, h/vexpand, etc).
I avoided using percentages between children because in practice it felt
jittery under resize. But since we use natural size + expand and what
not, the typical resize case is attractive.
If you need persistence of settings between runs, there are
child-properties for everything.
-- Christian
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]