Subject: Re: bug#56607: 29.0.50; (setq auto-resize-tool-bars 'grow-only) has no effect (pgtk)

From: Po Lu <[email-masked]>
Date: Mon, 18 Jul 2022 12:35:42 +0800

Richard Hansen <[email-masked]> writes:

> Can the dimensions of the toolbar be inspected?

Yes, the height and width are constant when the tool bar is on the top
or bottom.  When the tool bar is on the left or right of the frame, then
resizing can happen, but in that case I'm not sure how it works.

> If so, we can force the container widget to never shrink if
> `auto-resize-tool-bars' is `grow-only'.

GTK never resizes the tool bar itself, so I'm not sure how that would
make a difference.

> If the toolbar width changes, we could do the (un)wrapping ourselves:
> move the buttons to/from another toolbar underneath the upper toolbar.
> The lower toolbar would still be inside the same container widget as
> the upper toolbar, and `grow-only' would pay attention to the sum of
> the heights of the toolbars.  Would that work?

Maybe, but it's a lot of trouble to create such a feature that the GTK
developers are bound to break at some point.

> (Sorry for all of the questions; I'm not familiar with GTK.  But I'm
> willing to spend some time to cook up some patches if given some hints
> on how to tackle the problem.)

I'd rather just disable auto-resize-tool-bars under GTK.  That's not a
feature GTK tool bars are designed to support.