I'm creating a simple "sticky note" application using GTK3. I implement the notes by wrapping a TextView in ScrolledWindow. I put them in Layout, so they are free to grow. I set min/max_content_width/height to control note size: I want it to start with some minimum size, then grow up to some point as text is entered into TextView and then once max size is reached, I want scrollbars to appear.
Minimum size works as expected, however ScolledWindow never grows - as soon as entered text stops fitting the initial area scrollbars appear. I tried setting vexpand/hexpand on both ScrolledWindow and TextView, but it didn't help.
There is little documentation on this, but as I understand it, max_content_width/height should do exactly what I need: expand ScrolledWindow up to some size, then show scrollbars. Is it some bug or am I missing something?
I'm using Rust, GTK 3.24.24 on Linux.