Is gtk_paned_get_preferred_size_for_opposite_orientation() computing handle_size correctly?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Is gtk_paned_get_preferred_size_for_opposite_orientation() computing handle_size correctly?

Santiago León
I have been debugging a failed assertion when requesting a window size and using thin handles in a GtkPaned in GTK+ 3.22.

I believe the problem is in the function gtk_paned_get_preferred_size_for_opposite_orientation(). Here, handle_size is computed with:

gtk_css_gadget_get_preferred_size (priv->handle_gadget,
                                   OPPOSITE_ORIENTATION (priv->orientation),
                                   -1,
                                   NULL, &handle_size,
                                   NULL, NULL);

But, if I'm reading the code correctly, it should be getting the size in the orientation priv->orientation, not it's opposite. 

For example, in a horizontal GtkPaned, this function should return the height based on the provided width in size.To compute the width of child2 it should subtract from size the width of child1 and the width of the handle. The width of the handle should then be computed in the same orientation as the widget. Then, based on these widths, the height of each child is measured and the maximum of them taken as the result.

Am I understanding this correctly?, should I make a PR with the single line change?

Regards,
Santiago León O.

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