From 0bb50594f9118eedaac32d716f2eaf81e3efe1dc Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 23 Jul 2009 20:50:24 +0000 Subject: 2.5: UI * Fix issue where it would automatically scroll when collapsing panels. * Fix panel dragging not taking zoom level into account. * Fix enum menu having too small default width in headers. * Fix tooltips not showing shortcuts etc. if there was not tooltip defined for the button. * Fix some refresh issues with color ramps. * Add a bit more space between columns in the layout engine. * Make scrollers darker so they are less distracting, and highlight instead of reverse shading when dragging. --- source/blender/editors/interface/interface_panel.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/editors/interface/interface_panel.c') 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); -- cgit v1.2.3