Fix: Asset shelf scrolling distance wrong when scrolling down
The currently it requires the mouse to `1.5 * page_size` from the top to the bottom to scroll down, this change instead makes the pan scroll to happen every half page size in both directions. Completes fixes for #110779 Pull Request: https://projects.blender.org/blender/blender/pulls/111520
This commit is contained in:
committed by
Julian Eisel
parent
44f86dc7ed
commit
4c7e1264a3
@@ -52,7 +52,7 @@ static bool view2d_poll(bContext *C)
|
||||
static float view2d_scroll_delta_y_snap_page_size(const View2D &v2d, const float delta_y)
|
||||
{
|
||||
const float page_size = view2d_page_size_y(v2d);
|
||||
const int delta_pages = int((delta_y - page_size * 0.5f) / page_size);
|
||||
const int delta_pages = int(delta_y / (page_size * 0.5f));
|
||||
|
||||
/* Apply no change, don't update last coordinates. */
|
||||
if (abs(delta_pages) < 1) {
|
||||
|
||||
Reference in New Issue
Block a user