Changeset 4583015 in mainline for uspace/lib/ui/src/slider.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/lib/ui/src/slider.c

    r5c27e77 r4583015  
    341341
    342342        gfx_text_fmt_init(&fmt);
     343        fmt.font = slider->res->font;
    343344        fmt.color = slider->res->wnd_text_color;
    344345        fmt.halign = gfx_halign_left;
     
    357358        buf[w * gcharsz] = '\0';
    358359
    359         rc = gfx_puttext(slider->res->font, &pos, &fmt, buf);
     360        rc = gfx_puttext(&pos, &fmt, buf);
    360361        free(buf);
    361362        if (rc != EOK)
     
    366367        pos.x += slider->pos;
    367368
    368         rc = gfx_puttext(slider->res->font, &pos, &fmt,
    369             "[O]");
     369        rc = gfx_puttext(&pos, &fmt, "[O]");
    370370        if (rc != EOK)
    371371                goto error;
Note: See TracChangeset for help on using the changeset viewer.