Changeset 6df564c in mainline for uspace/lib/ui/src/entry.c


Ignore:
Timestamp:
2021-09-19T18:02:14Z (4 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
68632b4
Parents:
80d4aea
Message:

Custom colors for selected text in text entry

In text mode, swapping 'background' and 'text' color does not work,
they are the same. Looks better in graphics mode, too.

File:
1 edited

Legend:

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

    r80d4aea r6df564c  
    343343                c = entry->text[off2];
    344344                entry->text[off2] = '\0';
    345                 cfmt.color = res->entry_bg_color;
     345                cfmt.color = res->entry_sel_text_fg_color;
    346346
    347347                gfx_text_rect(res->font, &cpos, &cfmt, entry->text + off1, &sel);
     
    351351                sel.p1.y += ui_entry_sel_vpad;
    352352
    353                 rc = gfx_set_color(res->gc, res->entry_fg_color);
     353                rc = gfx_set_color(res->gc, res->entry_sel_text_bg_color);
    354354                if (rc != EOK)
    355355                        goto error;
Note: See TracChangeset for help on using the changeset viewer.