I have a TextView widget whose size, first time it gets to show something, after its creation appears to be one of two possibilities. One at the expected size and another about 2.5 times as large. If I just create the text view widget and not write to it, the widget and the box it lives in remains unscaled. The probalbility of “wrong” size is about 50%. Afterwards, the box can be manually reduced to its intended size and subsequent updates of the widget will not resize it.
Does not matter if I write a const char to it using:
or what I usually do,
gtk_text_buffer_get_iter_at_offset(buffer, &iter, 0);
gtk_text_buffer_insert_markup(buffer, &iter, markup, -1);
Same problem. Seems to be a race condition, I guess, but how to I get closer to what is the problem? This widget lives inside a layer of GtkBox:es, horizontal and vertical, that’s all.
(GTK4, ubuntu 23.04, libgtk-4.so.1.1000.4)