I’m learning GTK4 and I’m trying to make a sort of gallery with labels (how original). All the images have the same aspect ratio and are placed as such :
GtkScrolledWindow GtkViewPort GtkFlowBox GtkFlowBoxChild GtkBox GtkImage GtkLabel GtkFlowBoxChild GtkBox GtkImage GtkLabel ...
I have the
FlowBox set to have 5 elements per row.
FlowBoxChild all stretch horizontally to take the whole width and their
box do the same.
What I would like is the images also stretch horizontally to take up their box’s full width and make the box bigger vertically by keeping their natural aspect ratio.
However, this is not happening. The images’ bounding box seems to expand as wanted, but it wont respect the image’s aspect ratio. How could I do that ?
See here the image’s bounding box in blue, with the help of the GTK Inspector.