tiling: Fix flickering on overview (fix #345)

This commit is contained in:
Victoria Brekenfeld 2024-03-11 16:18:49 +01:00
parent e3159f92d1
commit e959e4f1ac

View file

@ -5257,10 +5257,12 @@ where
)
}
let behavior = if animating {
ConstrainScaleBehavior::Stretch
let (behavior, align) = if is_overview {
(ConstrainScaleBehavior::Fit, ConstrainAlign::CENTER)
} else if animating {
(ConstrainScaleBehavior::Stretch, ConstrainAlign::TOP_LEFT)
} else {
ConstrainScaleBehavior::CutOff
(ConstrainScaleBehavior::CutOff, ConstrainAlign::TOP_LEFT)
};
let w_elements = w_elements.into_iter().flat_map(|element| match element {
@ -5271,7 +5273,7 @@ where
geo.as_logical().to_physical_precise_round(output_scale),
elem_geometry,
behavior,
ConstrainAlign::TOP_LEFT,
align,
output_scale,
)
.next()
@ -5283,7 +5285,7 @@ where
geo.as_logical().to_physical_precise_round(output_scale),
elem_geometry,
behavior,
ConstrainAlign::TOP_LEFT,
align,
output_scale,
)
.next()
@ -5295,7 +5297,7 @@ where
geo.as_logical().to_physical_precise_round(output_scale),
elem_geometry,
behavior,
ConstrainAlign::TOP_LEFT,
align,
output_scale,
)
.next()