Is gtk_paned_get_preferred_size_for_opposite_orientation() computing handle_size correctly?
- From: Santiago León <santileortiz gmail com>
- To: gtk-list gnome org
- Subject: Is gtk_paned_get_preferred_size_for_opposite_orientation() computing handle_size correctly?
- Date: Wed, 2 May 2018 13:07:06 -0500
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.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]