mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-14 01:27:35 -05:00

It turns out that in GTK3, if you instantiate a GtkLabel and immediately try to find out its preferred size, you get back zero for both dimensions. Presumably none of that gets figured out properly until the widget is displayed, or some such. However, you can retrieve the PangoLayout from the label immediately and ask Pango for the dimensions of that. That seems like a bit of a bodge, but it works! The GTK3 unifont selector now comes out with all the interface elements in sensible sizes - in particular, the preview drawing area now has non-zero height.