Changeset 4583015 in mainline for uspace/lib/ui/src/menuentry.c


Ignore:
Timestamp:
2022-03-07T16:10:44Z (3 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ca2680d
Parents:
5c27e77
Message:

Add font to gfx_text_fmt_t

This is quite logical and saves us one argument that we need to pass to
all text formatting functions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ui/src/menuentry.c

    r5c27e77 r4583015  
    351351
    352352        gfx_text_fmt_init(&fmt);
     353        fmt.font = res->font;
    353354        fmt.halign = gfx_halign_left;
    354355        fmt.valign = gfx_valign_top;
     
    371372                goto error;
    372373
    373         rc = gfx_puttext(res->font, &geom.caption_pos, &fmt, mentry->caption);
     374        rc = gfx_puttext(&geom.caption_pos, &fmt, mentry->caption);
    374375        if (rc != EOK)
    375376                goto error;
     
    377378        fmt.halign = gfx_halign_right;
    378379
    379         rc = gfx_puttext(res->font, &geom.shortcut_pos, &fmt, mentry->shortcut);
     380        rc = gfx_puttext(&geom.shortcut_pos, &fmt, mentry->shortcut);
    380381        if (rc != EOK)
    381382                goto error;
Note: See TracChangeset for help on using the changeset viewer.