ScrolledWindow doesn't expand with TextView according to max_content_height
Steps to reproduce
- Put
TextView
inScrolledWindow
and then intoLayout
. - Set some
max-content-height
onScrolledWindow
. - Run the application. Type multiple lines into
TextView
so that text doesn't fit into originally sized widget.
Current behavior
- When
ScrolledWindow
has vertical scroll policy set to AUTO, then it never expands beyond its original size and shows scrollbars as soon as theTextView
doesn't fit. - When
ScrolledWindow
has vertical scroll policy set to NEVER, then it always expands, but sometimes not enough for the line of text to fit. This results in the text cursor being placed above unusable blank area.
Expected outcome
- When
ScrolledWindow
has vertical scroll policy set to AUTO, then it should expand up tomax-content-height
and then show scrollbars. - When
ScrolledWindow
has vertical scroll policy set to NEVER, then it should expand so that new line of text is always at the bottom.
Version information
GTK 3.24.24 Debian Linux
Additional information
Attached a simple Glade file that demonstrates two cases and a TextView
outside of ScrolledWindow
for comparison. Also attached a screen recording.
I created a StackOverflow question (https://stackoverflow.com/questions/65449889/gtk-scrolledwindow-max-content-width-height-does-not-work-with-textview), but now I believe this is a bug (or two separate bugs), so I decided to report it here too.