Setting the “can-shrink” property on a Picture
causes it to generate useless space below.
And it seems to work fine with images that are rather wide.
The Picture
doesn’t have that empty space it generates, it’s not binded to any widget. It’s simply there.
Code:
let image = gtk::Picture::builder()
.css_name("img")
.alternative_text(element.attributes.get("alt").unwrap().clone().unwrap())
.css_classes(element.classes.clone())
.halign(gtk::Align::Start)
.valign(gtk::Align::Start)
.can_shrink(false)
.build();
If I try to resize the window, it occupies that empty space.
So the question is - is there a property I am missing that can fix this, or is there something else I’m doing wrong?