Changeset ca2680d in mainline for uspace/lib/ui/src/menubar.c
- Timestamp:
- 2022-03-07T21:07:02Z (3 years ago)
- Branches:
- master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 96c6a00
- Parents:
- 4583015
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ui/src/menubar.c
r4583015 rca2680d 150 150 { 151 151 ui_resource_t *res; 152 gfx_text_fmt_t fmt;152 ui_text_fmt_t fmt; 153 153 gfx_coord2_t pos; 154 154 gfx_coord2_t tpos; … … 184 184 pos = mbar->rect.p0; 185 185 186 gfx_text_fmt_init(&fmt);186 ui_text_fmt_init(&fmt); 187 187 fmt.font = res->font; 188 188 fmt.halign = gfx_halign_left; … … 192 192 while (menu != NULL) { 193 193 caption = ui_menu_caption(menu); 194 width = gfx_text_width(res->font, caption) + 2 * hpad;194 width = ui_text_width(res->font, caption) + 2 * hpad; 195 195 tpos.x = pos.x + hpad; 196 196 tpos.y = pos.y + vpad; … … 202 202 if (menu == mbar->selected) { 203 203 fmt.color = res->wnd_sel_text_color; 204 fmt.hgl_color = res->wnd_sel_text_hgl_color; 204 205 bg_color = res->wnd_sel_text_bg_color; 205 206 } else { 206 207 fmt.color = res->wnd_text_color; 208 fmt.hgl_color = res->wnd_text_hgl_color; 207 209 bg_color = res->wnd_face_color; 208 210 } … … 216 218 goto error; 217 219 218 rc = gfx_puttext(&tpos, &fmt, caption);220 rc = ui_paint_text(&tpos, &fmt, caption); 219 221 if (rc != EOK) 220 222 goto error; … … 416 418 while (menu != NULL) { 417 419 caption = ui_menu_caption(menu); 418 width = gfx_text_width(res->font, caption) + 2 * hpad;420 width = ui_text_width(res->font, caption) + 2 * hpad; 419 421 420 422 rect.p0 = pos; … … 467 469 while (cur != NULL) { 468 470 caption = ui_menu_caption(cur); 469 width = gfx_text_width(res->font, caption) + 2 * hpad;471 width = ui_text_width(res->font, caption) + 2 * hpad; 470 472 471 473 rect.p0 = pos;
Note:
See TracChangeset
for help on using the changeset viewer.