Changeset 68d68e9 in mainline for uspace/lib/ui/src/pbutton.c
- Timestamp:
- 2022-11-23T12:50:27Z (17 months ago)
- Branches:
- master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c4a53280
- Parents:
- 6e91475
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ui/src/pbutton.c
r6e91475 r68d68e9 54 54 enum { 55 55 ui_pb_press_dx = 1, 56 ui_pb_press_dy = 1 56 ui_pb_press_dy = 1, 57 ui_pb_pad_x = 2, 58 ui_pb_pad_x_text = 1 57 59 }; 58 60 … … 323 325 gfx_text_fmt_t fmt; 324 326 gfx_rect_t rect; 327 gfx_rect_t irect; 325 328 gfx_coord_t thickness; 326 329 bool depressed; … … 360 363 } else { 361 364 /* Text decoration */ 365 ui_paint_get_inset_frame_inside(pbutton->res, &rect, &irect); 362 366 gfx_text_fmt_init(&fmt); 363 367 fmt.font = pbutton->res->font; … … 365 369 fmt.halign = gfx_halign_center; 366 370 fmt.valign = gfx_valign_center; 371 fmt.abbreviate = true; 372 fmt.width = irect.p1.x - irect.p0.x - 2 * ui_pb_pad_x; 367 373 368 374 rc = gfx_puttext(&pos, &fmt, pbutton->caption); … … 442 448 fmt.halign = gfx_halign_center; 443 449 fmt.valign = gfx_valign_center; 450 fmt.abbreviate = true; 451 fmt.width = rect.p1.x - rect.p0.x - 2 * ui_pb_pad_x_text; 444 452 445 453 rc = gfx_puttext(&pos, &fmt, pbutton->caption);
Note:
See TracChangeset
for help on using the changeset viewer.