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

    r5c27e77 r4583015  
    242242
    243243                gfx_text_fmt_init(&fmt);
     244                fmt.font = wdecor->res->font;
    244245                fmt.color = wdecor->active ?
    245246                    wdecor->res->tbar_act_text_color :
     
    253254                if (wdecor->res->textmode) {
    254255                        /* Make space around caption text */
    255                         gfx_text_rect(wdecor->res->font, &pos, &fmt,
    256                             wdecor->caption, &text_rect);
     256                        gfx_text_rect(&pos, &fmt, wdecor->caption, &text_rect);
    257257
    258258                        /* Only make space if caption is non-empty */
     
    273273                }
    274274
    275                 rc = gfx_puttext(wdecor->res->font, &pos, &fmt, wdecor->caption);
     275                rc = gfx_puttext(&pos, &fmt, wdecor->caption);
    276276                if (rc != EOK)
    277277                        return rc;
Note: See TracChangeset for help on using the changeset viewer.