Fixed #675 List view

pull/685/head
vurtun 2018-04-23 11:01:06 +02:00
parent 0981c1a321
commit da3f7fed6c
2 changed files with 2 additions and 2 deletions

View File

@ -18730,7 +18730,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;
return result;

View File

@ -54,7 +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;
return result;