Changeset f251883 in mainline for uspace/lib/ui/src/menuentry.c
- Timestamp:
- 2021-04-09T22:41:22Z (4 years ago)
- Branches:
- master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f536a16
- Parents:
- 62223ec
- git-author:
- Jiri Svoboda <jiri@…> (2021-04-01 21:31:24)
- git-committer:
- jxsvoboda <5887334+jxsvoboda@…> (2021-04-09 22:41:22)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ui/src/menuentry.c
r62223ec rf251883 69 69 { 70 70 ui_menu_entry_t *mentry; 71 gfx_coord_t width; 71 72 72 73 mentry = calloc(1, sizeof(ui_menu_entry_t)); … … 82 83 mentry->menu = menu; 83 84 list_append(&mentry->lentries, &menu->entries); 85 86 /* Update accumulated menu entry dimensions */ 87 width = ui_menu_entry_width(mentry); 88 if (width > menu->max_w) 89 menu->max_w = width; 90 menu->total_h += ui_menu_entry_height(mentry); 84 91 85 92 *rmentry = mentry; … … 372 379 gfx_coord_t hpad; 373 380 gfx_coord_t vpad; 374 const char *caption;375 381 gfx_coord_t width; 376 382 … … 385 391 } 386 392 387 caption = mentry->caption; 388 width = gfx_text_width(res->font, caption) + 2 * hpad; 393 width = mentry->menu->max_w; 389 394 geom->text_pos.x = pos->x + hpad; 390 395 geom->text_pos.y = pos->y + vpad;
Note:
See TracChangeset
for help on using the changeset viewer.