Giving GtkPane more than 2 children?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Giving GtkPane more than 2 children?

Ryan Gonzalez
Hello!

In the past, I've come upon the situation of wanting *more* than two panes. When I look this up, I usually see people wiring together multiple GtkPanes. Would the GTK+ devs be interested in a merge request to add support for multiple panes? 

--
Ryan (ライアン)
Yoko Shimomura, ryo (supercell/EGOIST), Hiroyuki Sawano >> everyone else
https://refi64.com/

_______________________________________________
gtk-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: Giving GtkPane more than 2 children?

Christian Hergert
On 05/10/2018 11:46 AM, Ryan Gonzalez wrote:
>
> In the past, I've come upon the situation of wanting *more* than two
> panes. When I look this up, I usually see people wiring together
> multiple GtkPanes. Would the GTK+ devs be interested in a merge request
> to add support for multiple panes? 
>


https://gitlab.gnome.org/GNOME/gtk/issues/545
https://gitlab.gnome.org/GNOME/libdazzle/blob/master/src/widgets/dzl-multi-paned.c

_______________________________________________
gtk-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: Giving GtkPane more than 2 children?

Paul Davis
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.

On Thu, May 10, 2018 at 3:30 PM, Christian Hergert <[hidden email]> wrote:
On 05/10/2018 11:46 AM, Ryan Gonzalez wrote:
>
> In the past, I've come upon the situation of wanting *more* than two
> panes. When I look this up, I usually see people wiring together
> multiple GtkPanes. Would the GTK+ devs be interested in a merge request
> to add support for multiple panes? 
>


https://gitlab.gnome.org/GNOME/gtk/issues/545
https://gitlab.gnome.org/GNOME/libdazzle/blob/master/src/widgets/dzl-multi-paned.c

_______________________________________________
gtk-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


_______________________________________________
gtk-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: Giving GtkPane more than 2 children?

Christian Hergert
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
_______________________________________________
gtk-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-devel-list