Better fix to the overdraw thing

Sometimes i was still catching gaps at the bottom of listers
This commit is contained in:
Jack Punter 2022-06-24 00:29:57 +01:00
parent 362a85373a
commit dc692dc0d4
1 changed files with 1 additions and 3 deletions

View File

@ -295,9 +295,6 @@ lister_render(Application_Links *app, Frame_Info frame_info, View_ID view){
i32 first_index = (i32)(scroll_y/block_height); i32 first_index = (i32)(scroll_y/block_height);
y_pos += first_index*block_height; y_pos += first_index*block_height;
i32 max_count = first_index + lister->visible_count + 3;
count = clamp_top(lister->filtered.count, max_count);
for (i32 i = first_index; i < count; i += 1){ for (i32 i = first_index; i < count; i += 1){
Lister_Node *node = lister->filtered.node_ptrs[i]; Lister_Node *node = lister->filtered.node_ptrs[i];
@ -305,6 +302,7 @@ lister_render(Application_Links *app, Frame_Info frame_info, View_ID view){
y_pos = y.max; y_pos = y.max;
Rect_f32 item_rect = Rf32(x, y); Rect_f32 item_rect = Rf32(x, y);
if (item_rect.y0 > region.y1) { break; }
Rect_f32 item_inner = rect_inner(item_rect, 3.f); Rect_f32 item_inner = rect_inner(item_rect, 3.f);
b32 hovered = rect_contains_point(item_rect, m_p); b32 hovered = rect_contains_point(item_rect, m_p);