Underline disappears with "larger" text next to it with large allocated width only on certain allocated height
Steps to reproduce
(that title is likely unclear but this bug doesn't have much in the way of logic/simplicity anyway…)
- Open the GTK4 Demo "Markup"
- Go to the source markup part with the checkbox
- Replace all the markup with
<span size="larger">large text</span> <u>underlined</u>
- Go back to the non source view (rendered markup view)
- Center the window on your screen
- Make it really large, i.e. whole screen width or two third of it
- Adjust the height of the window slowly, pixel by pixel
This is reproducible with both GtkLabel (label tested locally with own code) and GtkTextView (in the demo).
Current behavior
The underlined part disappears with some random allocated height.
Expected outcome
Always show the underline.
Version information
GTK4 demo from flathub, Fedora 33, Wayland, 1600x900px screen size without HiDPI.
Additional information
Screencast: screencast
Interestingly it seems that this flickering happens a lot more when the height of the window is smaller, so if you grow the height of the window linearly (time-wise) the flickers will be much less frequent when the window is big enough.
Also, if you add the markup line a lot through multiple lines, some but not all underlines disappears (which seems logical anyway), like so: