UI: Remove Panel Grid Snapping While Dragging
The reason to have this isn't quite clear, but it looks like a vestige of the 2.5 transition. Removing this makes dragging panels feel much more responsive. Thanks to Julian Eisel @Severin for the original change. Differential Revision: https://developer.blender.org/D7803
This commit is contained in:
@@ -105,7 +105,6 @@ extern const char ui_radial_dir_to_numpad[8];
|
||||
extern const short ui_radial_dir_to_angle[8];
|
||||
|
||||
/* internal panel drawing defines */
|
||||
#define PNL_GRID (UI_UNIT_Y / 5) /* 4 default */
|
||||
#define PNL_HEADER (UI_UNIT_Y * 1.2) /* 24 default */
|
||||
|
||||
/* bit button defines */
|
||||
|
||||
@@ -1322,8 +1322,8 @@ static void ui_do_drag(const bContext *C, const wmEvent *event, Panel *panel)
|
||||
return;
|
||||
}
|
||||
|
||||
dx = (event->x - data->startx) & ~(PNL_GRID - 1);
|
||||
dy = (event->y - data->starty) & ~(PNL_GRID - 1);
|
||||
dx = (event->x - data->startx);
|
||||
dy = (event->y - data->starty);
|
||||
|
||||
dx *= (float)BLI_rctf_size_x(®ion->v2d.cur) / (float)BLI_rcti_size_x(®ion->winrct);
|
||||
dy *= (float)BLI_rctf_size_y(®ion->v2d.cur) / (float)BLI_rcti_size_y(®ion->winrct);
|
||||
|
||||
Reference in New Issue
Block a user