Changeset 86fff971 in mainline for uspace/lib/ui/test/paint.c


Ignore:
Timestamp:
2022-04-04T18:49:30Z (3 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
fd05ea6
Parents:
d68239a1
Message:

'X' does not mark the spot

Stop misusing 'X' character as a cross mark, create a routine for
drawing a cross and use it as a custom decoration for the close button.
Also use it for checkbox cross.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ui/test/paint.c

    rd68239a1 r86fff971  
    332332}
    333333
     334/** Paint diagonal cross (X) */
     335PCUT_TEST(cross)
     336{
     337        errno_t rc;
     338        gfx_context_t *gc = NULL;
     339        test_gc_t tgc;
     340        gfx_coord2_t center;
     341
     342        memset(&tgc, 0, sizeof(tgc));
     343        rc = gfx_context_new(&ops, &tgc, &gc);
     344        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     345
     346        center.x = 0;
     347        center.y = 0;
     348
     349        rc = ui_paint_cross(gc, &center, 5, 1, 2);
     350        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     351
     352        rc = gfx_context_delete(gc);
     353        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     354}
     355
    334356/** Paint text box */
    335357PCUT_TEST(text_box)
Note: See TracChangeset for help on using the changeset viewer.