Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/interface/interface_panel.c')
-rw-r--r--source/blender/editors/interface/interface_panel.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c
index 377861ae0d7..846fbe75072 100644
--- a/source/blender/editors/interface/interface_panel.c
+++ b/source/blender/editors/interface/interface_panel.c
@@ -1031,6 +1031,9 @@ static void ui_do_drag(const bContext *C, wmEvent *event, Panel *panel)
dx= (event->x-data->startx) & ~(PNL_GRID-1);
dy= (event->y-data->starty) & ~(PNL_GRID-1);
+
+ dx *= (float)(ar->v2d.cur.xmax - ar->v2d.cur.xmin)/(float)(ar->winrct.xmax - ar->winrct.xmin);
+ dy *= (float)(ar->v2d.cur.ymax - ar->v2d.cur.ymin)/(float)(ar->winrct.ymax - ar->winrct.ymin);
if(data->state == PANEL_STATE_DRAG_SCALE) {
panel->sizex = MAX2(data->startsizex+dx, UI_PANEL_MINX);