Second attempt to fix #675

pull/685/head
vurtun 2018-04-23 16:17:24 +02:00
parent f79b080d84
commit 823f79f856
2 changed files with 2 additions and 0 deletions

View File

@ -18732,6 +18732,7 @@ nk_list_view_begin(struct nk_context *ctx, struct nk_list_view *view,
view->total_height = row_height * NK_MAX(row_count,1);
view->begin = (int)NK_MAX(((float)view->scroll_value / (float)row_height), 0.0f);
view->count = (int)NK_MAX(nk_iceilf((layout->clip.h)/(float)row_height),0);
view->count = NK_MIN(view->count, row_count - view->begin);
view->end = view->begin + view->count;
view->ctx = ctx;

View File

@ -54,6 +54,7 @@ nk_list_view_begin(struct nk_context *ctx, struct nk_list_view *view,
view->total_height = row_height * NK_MAX(row_count,1);
view->begin = (int)NK_MAX(((float)view->scroll_value / (float)row_height), 0.0f);
view->count = (int)NK_MAX(nk_iceilf((layout->clip.h)/(float)row_height),0);
view->count = NK_MIN(view->count, row_count - view->begin);
view->end = view->begin + view->count;
view->ctx = ctx;