imageView: Fix vertical minimum size in measure
This commit is contained in:
parent
6e29b1ebff
commit
3dc9e40bcb
2 changed files with 9 additions and 3 deletions
|
|
@ -210,8 +210,14 @@ mod imp {
|
|||
let (overlay1_min, _, _, _) = self.controls_box_start.measure(orientation, for_size);
|
||||
let (overlay2_min, _, _, _) = self.controls_box_end.measure(orientation, for_size);
|
||||
|
||||
let overlay_min = match orientation {
|
||||
gtk::Orientation::Horizontal => overlay1_min + overlay2_min,
|
||||
gtk::Orientation::Vertical => i32::max(overlay1_min, overlay2_min),
|
||||
_ => unreachable!(),
|
||||
};
|
||||
|
||||
// take as minimum whatever is larger
|
||||
let min = i32::max(child_min, overlay1_min + overlay2_min);
|
||||
let min = i32::max(child_min, overlay_min);
|
||||
// take as natural whatever is larger
|
||||
let natural = i32::max(child_natural, min);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue