Changeset d68239a1 in mainline for uspace/lib/ui/test/scrollbar.c


Ignore:
Timestamp:
2022-04-04T14:48:41Z (2 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
86fff971
Parents:
0d1d0ea
git-author:
Jiri Svoboda <jiri@…> (2022-04-03 17:48:17)
git-committer:
Jiri Svoboda <jiri@…> (2022-04-04 14:48:41)
Message:

Scrollbar needs custom button decorations

Push button now allows setting a 'custom decoration' which means
instead of painting the button text a callback function is invoked
to paint the decoration.

File:
1 edited

Legend:

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

    r0d1d0ea rd68239a1  
    319319
    320320        /* Total length minus buttons */
    321         PCUT_ASSERT_INT_EQUALS(110 - 10 - 2 * 20, length);
     321        PCUT_ASSERT_INT_EQUALS(110 - 10 - 2 * 21, length);
    322322
    323323        ui_scrollbar_destroy(scrollbar);
     
    361361
    362362        /* Total length minus buttons minus default thumb length */
    363         PCUT_ASSERT_INT_EQUALS(110 - 10 - 2 * 20 - 20, length);
     363        PCUT_ASSERT_INT_EQUALS(110 - 10 - 2 * 21 - 21, length);
    364364
    365365        ui_scrollbar_destroy(scrollbar);
     
    492492        ui_scrollbar_set_pos(scrollbar, 42);
    493493        pos = ui_scrollbar_get_pos(scrollbar);
    494         /* The value is clipped to the maximum possible position (40) */
    495         PCUT_ASSERT_INT_EQUALS(40, pos);
     494        /* The value is clipped to the maximum possible position (37) */
     495        PCUT_ASSERT_INT_EQUALS(37, pos);
    496496
    497497        ui_scrollbar_destroy(scrollbar);
Note: See TracChangeset for help on using the changeset viewer.