2.5: various one-liner fixes
[blender.git] / source / blender / editors / interface / view2d.c
index 0f7532383c9599acb64be1756269f79483b8d674..c76110ac440d661e3e07d4ca5171fed945161d9f 100644 (file)
@@ -273,10 +273,12 @@ void UI_view2d_region_reinit(View2D *v2d, short type, int winx, int winy)
                                v2d->tot.ymin= -winy;
                                
                                v2d->cur.xmin= 0.0f;
-                               v2d->cur.xmax= winx*panelzoom;
+                               /* bad workaround for keeping zoom level with scrollers */
+                               v2d->cur.xmax= (winx - V2D_SCROLL_WIDTH)*panelzoom;
                                
                                v2d->cur.ymax= 0.0f;
-                               v2d->cur.ymin= -winy*panelzoom;
+                               /* bad workaround for keeping zoom level with scrollers */
+                               v2d->cur.ymin= (-winy + V2D_SCROLL_HEIGHT)*panelzoom;
                        }
                                break;