Commit 16414c17 authored by Daniel García Moreno's avatar Daniel García Moreno

image: Limit image size to the window size

parent 790f2898
Pipeline #12854 passed with stages
in 37 minutes and 59 seconds
......@@ -82,8 +82,9 @@ impl Image {
if let Some(p) = da.get_parent() {
let parent_width = p.get_allocated_width();
if parent_width < w {
rw = parent_width;
let max = parent_width - 50;
if max < w {
rw = max;
}
}
......
......@@ -274,9 +274,8 @@ impl<'a> MessageBox<'a> {
backend.send(BKCommand::GetMedia(url.clone())).unwrap();
});
viewbtn.set_image(&image.widget);
bx.add(&viewbtn);
viewbtn.add(&image.widget);
bx.pack_start(&viewbtn, true, true, 0);
bx
}
......@@ -288,7 +287,7 @@ impl<'a> MessageBox<'a> {
let w = image.widget.clone();
w.set_tooltip_text(&self.msg.body[..]);
bx.add(&w);
bx.pack_start(&w, true, true, 0);
bx
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment