Text views as non direct scrolled window's child get a height proportionate to the number of characters when in (word)char wrap mode before scrolling
Steps to reproduce
- clone and Run https://gitlab.gnome.org/Vanadiae/test-scrolled-window-with-non-adjacent-scrollable.git in Builder
Current behavior
The basic widget tree is just a scrolledwindow with any container containing textviews, so something like that:
- ScrolledWindow
- Some container like GtkBox
- any number of textviews or other widgets
This issue only happens when the wrap mode of the textview is set to word&char or char alone, but it doesn't happen with none or word. Also, this only happens with textviews, not labels.
When the window is first opened, each textview span the same number of lines that they have of characters, so for example for text hello
it'll span five lines height.
Then once you start scrolling (even just a tiny bit it) the text views change size to take their expected height, which is only one line here.
Expected outcome
The textviews should always only span the height they need, regardless of whether they were ever scrolled (so always like in the second screenshot).
Version information
GTK4 through the GNOME flatpak sdk//master.