Clamp zoom level to 1.0 if < 1.01
Fix floating point edge cases that keep zoom enabled when level ≈ 1.0 Co-authored-by: Luuk van der Duim <luukvanderduim@gmail.com>
This commit is contained in:
parent
738e0b3124
commit
8304b18886
1 changed files with 1 additions and 0 deletions
|
|
@ -1125,6 +1125,7 @@ impl State {
|
|||
current_level * factor
|
||||
}
|
||||
.clamp(1.0, MAX_ZOOM);
|
||||
let new_level = if new_level < 1.01 { 1.0 } else { new_level };
|
||||
shell.trigger_zoom(
|
||||
seat,
|
||||
Some(&output),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue