Skip to content

Improved editor zoom - #9008

Open
Raiguri wants to merge 4 commits into
4ian:masterfrom
Raiguri:smooth-zoom
Open

Improved editor zoom#9008
Raiguri wants to merge 4 commits into
4ian:masterfrom
Raiguri:smooth-zoom

Conversation

@Raiguri

@Raiguri Raiguri commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Description

I hated how clunky and slow zoom was in GDevelop, so I tried to fix it and add some other things.

The main change is that zoom no longer jumps instantly. Instead we split the zoom value into a target and a current value. The target changes right away when you scroll or use keyboard shortcuts. Then every frame the current zoom moves towards the target using a logarithmic interpolation. This makes the zoom glide instead of snap, and it feels consistent at any zoom level.

I also fixed the wheel zoom to behave better on different devices (I tried to do it, because it was in ZoomUtils ToDO). A trackpad gives a continuous motion, so the zoom speed follows how fast you flick. A mouse wheel works in discrete clicks, so each click now gives a fixed step and ignores the operating system's extra scaling. But it need testing on laptop and MacOS, unfortunately I don't have access to such devices.

The code now wires everything into the main editor loop. The target zoom is stored separately from the displayed zoom, and the interpolation runs inside the render loop using the real time between frames. The zoom presets and pinch gestures still work instantly, and they reset the target so they do not fight with ongoing animations.

Video Preview

Before

Screencast_20260825_135521.webm

After

Screencast_20260825_135232.webm

#7969

tried to implement trackpad, mouse wheel, macOS speed zoom, instead of just deltaY

need testing for macOS and trackpad
@Raiguri
Raiguri requested a review from 4ian as a code owner August 25, 2026 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant