1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:07:47 +00:00

PixelPaint: Make scaling exponential

This matches behaviour of other image editors, e.g GIMP.
The default ZoomTool sensitivity was increased for better zooming
experience :^)
This commit is contained in:
Maciej Zygmanowski 2021-08-24 18:26:37 +02:00 committed by Andreas Kling
parent 96dee93d3f
commit 635130ef76
2 changed files with 2 additions and 2 deletions

View file

@ -390,7 +390,7 @@ Layer* ImageEditor::layer_at_editor_position(Gfx::IntPoint const& editor_positio
void ImageEditor::clamped_scale(float scale_delta)
{
m_scale += scale_delta;
m_scale *= AK::exp2(scale_delta);
if (m_scale < 0.1f)
m_scale = 0.1f;
if (m_scale > 100.0f)