Changeset 4583015 in mainline for uspace/app/nav/panel.c


Ignore:
Timestamp:
2022-03-07T16:10:44Z (2 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/app/nav/panel.c

    r5c27e77 r4583015  
    175175
    176176        gfx_text_fmt_init(&fmt);
     177        fmt.font = font;
    177178        rows = panel_page_size(panel);
    178179
     
    219220                return rc;
    220221
    221         rc = gfx_puttext(font, &pos, &fmt, entry->name);
     222        rc = gfx_puttext(&pos, &fmt, entry->name);
    222223        if (rc != EOK) {
    223224                (void) gfx_set_clip_rect(gc, NULL);
     
    236237        gfx_context_t *gc = ui_window_get_gc(panel->window);
    237238        ui_resource_t *res = ui_window_get_res(panel->window);
    238         gfx_text_fmt_t fmt;
    239239        panel_entry_t *entry;
    240240        ui_box_style_t bstyle;
     
    242242        int i, lines;
    243243        errno_t rc;
    244 
    245         gfx_text_fmt_init(&fmt);
    246244
    247245        rc = gfx_set_color(gc, panel->color);
Note: See TracChangeset for help on using the changeset viewer.