[ebassi] ebassi https://discourse.gnome.org/u/ebassi Emmanuele Bassi
https://discourse.gnome.org/u/ebassi Foundation Staff
I want to set its minimum height to zero (so it becomes completely invisible
until its parent grows to a height where it is needed)
This is not possible with GTK3: for historical and backward compatibility
reasons, widgets have a minimum size of 1x1 and it’s enforced inside GtkWidget
But that does not work: the absolute minimum height seems to be 4px.
This is likely caused by the CSS box applying some margin/padding.
Yes, I spotted that eventually and changed the css script.
But, contrary to what you said above, it DID then allow the height to reduce to
zero (seemingly the parent’s pack comment which allowed the Frame to expand to
fill the available space also allowed it to shrink to zero.
BUT any attempt to use padding.set_size_request(-1, 0); did leave the minimum at
1px, so I removed all such calls, and it is now working like a charm.
How can I achieve this?
when you don’t want the widget to contribute to the layout.
Yes, but that was the sort of complication I was trying to avoid, and even if
the Frame was hidden, it still insisted on leaving an empty space of the minimum
size where it had been until you did a window->resize(1,1).
Anyway, as I said, it is now working as I eanted.