Page MenuHome

UI: Zooming out in any editor/area its a lot faster than zooming in (exept the 3D view)
Confirmed, LowPublicTO DO

Description

System Information
Operating system: Linux-5.3.0-29-generic-x86_64-with-debian-buster-sid 64 Bits
Graphics card: GeForce GTX 1070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 435.21

Blender Version
Broken: version: 2.83 (sub 2), branch: master, commit date: 2020-02-03 17:41, hash: rB03a29090b57d
Worked: never worked properly in 2.8x

Short description of error
Using Ctrl+MiddleMB we can zoom in and out in a lot of areas from editors to toolbars, however zooming out goes a lot faster than zooming in, for example the 3D view works fine but not the toolbars or properties shelf.
Sorry for the video but i don't have a better way to explain it

https://youtu.be/WYdW96oN7z0

Exact steps for others to reproduce the error
Try to Zoom in any toolbar or the properties editor using Ctrl+mmb and look carefully how much do you move the mouse up and down.

Event Timeline

Nahuel Belich (belich) renamed this task from UI: Zooming out in any editor/are its a lot faster than zooming in to UI: Zooming out in any editor/area its a lot faster than zooming in (exept the 3D view).Tue, Feb 4, 12:51 AM
Nahuel Belich (belich) updated the task description. (Show Details)
Campbell Barton (campbellbarton) changed the task status from Needs Triage to Confirmed.Tue, Feb 4, 2:54 AM
Campbell Barton (campbellbarton) triaged this task as Low priority.
Campbell Barton (campbellbarton) changed the subtype of this task from "Report" to "To Do".Tue, Feb 4, 2:57 AM

Also there seems to be no way to reset the zoom for many editor panels

Also there seems to be no way to reset the zoom for many editor panels

You should be able to reset the zoom with Home

Changing the zoom axis from vertical to horizontal helps but that is not as comfortable in the 3d viewport.

This issues depends on the aspect ratio of the editor, so if you have a square view, the zoom in and out is quite uniform.
But if the view is rectangular then zoom in is much slower than out.

I tried this quick hack and it solved the issues:

diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c
index 5cf7cb4e7c4..88b488087c1 100644
--- a/source/blender/editors/interface/view2d_ops.c
+++ b/source/blender/editors/interface/view2d_ops.c
@@ -1081,11 +1081,13 @@ static int view_zoomdrag_invoke(bContext *C, wmOperator *op, const wmEvent *even
     /* support trackpad zoom to always zoom entirely - the v2d code uses portrait or
      * landscape exceptions */
     if (v2d->keepzoom & V2D_KEEPASPECT) {
+      const float ratio = BLI_rctf_size_x(&v2d->cur) / BLI_rctf_size_y(&v2d->cur);
+
       if (fabsf(dx) > fabsf(dy)) {
-        dy = dx;
+        dy = dx / ratio;
       }
       else {
-        dx = dy;
+        dx = dy * ratio;
       }
     }
     RNA_float_set(op->ptr, "deltax", dx);
@@ -1214,11 +1216,13 @@ static int view_zoomdrag_modal(bContext *C, wmOperator *op, const wmEvent *event
     /* support zoom to always zoom entirely - the v2d code uses portrait or
      * landscape exceptions */
     if (v2d->keepzoom & V2D_KEEPASPECT) {
+      float ratio = BLI_rctf_size_x(&v2d->cur) / BLI_rctf_size_y(&v2d->cur);
+
       if (fabsf(dx) > fabsf(dy)) {
-        dy = dx;
+        dy = dx / ratio;
       }
       else {
-        dx = dy;
+        dx = dy * ratio;
       }
     }

However MOUSEZOOM (trackpad pinch) is very slow.