Changeset b433f68 in mainline for uspace/lib/ui/src/rbutton.c


Ignore:
Timestamp:
2021-02-26T16:23:36Z (3 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
77ffa01
Parents:
fe40b67
Message:

Puttext needs to know the color of the text being printed

So far we were using the GC's current drawing color. But unless there
was a way to read it, we could not render text-mode text in the correct
color.

File:
1 edited

Legend:

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

    rfe40b67 rb433f68  
    274274        /* Paint rbutton label */
    275275
    276         rc = gfx_set_color(rbutton->group->res->gc,
    277             rbutton->group->res->wnd_text_color);
    278         if (rc != EOK)
    279                 goto error;
    280 
    281         /* Label position */
    282276        pos.x = center.x + rbutton_oframe_r + rbutton_label_margin;
    283277        pos.y = center.y;
    284278
    285279        gfx_text_fmt_init(&fmt);
     280        fmt.color = rbutton->group->res->wnd_text_color;
    286281        fmt.halign = gfx_halign_left;
    287282        fmt.valign = gfx_valign_center;
Note: See TracChangeset for help on using the changeset viewer.