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
|
|
@ -162,7 +162,7 @@
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<property name="content">
|
||||||
<object class="AdwToastOverlay" id="toast_overlay">
|
<object class="AdwToastOverlay" id="toast_overlay">
|
||||||
<property name="child">
|
<property name="child">
|
||||||
<object class="AdwFlap" id="properties_flap">
|
<object class="AdwFlap" id="properties_flap">
|
||||||
|
|
@ -221,7 +221,7 @@
|
||||||
</object>
|
</object>
|
||||||
</property>
|
</property>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</property>
|
||||||
</object>
|
</object>
|
||||||
</property>
|
</property>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -210,8 +210,14 @@ mod imp {
|
||||||
let (overlay1_min, _, _, _) = self.controls_box_start.measure(orientation, for_size);
|
let (overlay1_min, _, _, _) = self.controls_box_start.measure(orientation, for_size);
|
||||||
let (overlay2_min, _, _, _) = self.controls_box_end.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
|
// 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
|
// take as natural whatever is larger
|
||||||
let natural = i32::max(child_natural, min);
|
let natural = i32::max(child_natural, min);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue