Changeset 03fc3a9 in mainline
- Timestamp:
- 2022-06-02T12:38:39Z (3 years ago)
- Branches:
- master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- fdf55a3
- Parents:
- 11662bd
- git-author:
- Jiri Svoboda <jiri@…> (2022-06-01 18:37:42)
- git-committer:
- Jiri Svoboda <jiri@…> (2022-06-02 12:38:39)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ui/src/filelist.c
r11662bd r03fc3a9 185 185 gfx_rect_t rect; 186 186 gfx_rect_t lrect; 187 gfx_rect_t crect; 187 188 gfx_color_t *bgcolor; 188 189 char *caption; … … 198 199 gfx_text_fmt_init(&fmt); 199 200 fmt.font = font; 200 rows = ui_file_list_page_size(flist) ;201 rows = ui_file_list_page_size(flist) + 1; 201 202 202 203 /* Do not display entry outside of current page */ … … 245 246 rect.p1.y = rect.p0.y + line_height; 246 247 248 /* Clip to file list interior */ 249 gfx_rect_clip(&rect, &lrect, &crect); 250 247 251 rc = gfx_set_color(gc, bgcolor); 248 252 if (rc != EOK) 249 253 return rc; 250 254 251 rc = gfx_fill_rect(gc, & rect);255 rc = gfx_fill_rect(gc, &crect); 252 256 if (rc != EOK) 253 257 return rc; … … 261 265 * marker. 262 266 */ 263 rc = gfx_set_clip_rect(gc, & rect);267 rc = gfx_set_clip_rect(gc, &crect); 264 268 if (rc != EOK) 265 269 return rc; … … 325 329 } 326 330 327 lines = ui_file_list_page_size(flist) ;331 lines = ui_file_list_page_size(flist) + 1; 328 332 i = 0; 329 333 … … 477 481 { 478 482 gfx_coord_t line_height; 483 gfx_rect_t irect; 479 484 480 485 line_height = ui_file_list_entry_height(flist); 481 return (flist->rect.p1.y - flist->rect.p0.y) / line_height; 486 ui_file_list_inside_rect(flist, &irect); 487 return (irect.p1.y - irect.p0.y) / line_height; 482 488 } 483 489 … … 943 949 size_t idx; 944 950 945 assert(n < ui_file_list_page_size(flist));951 assert(n <= ui_file_list_page_size(flist)); 946 952 947 953 entry = flist->page;
Note:
See TracChangeset
for help on using the changeset viewer.