diff options
author | Simon Glass <sjg@chromium.org> | 2023-06-01 10:22:53 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-07-14 12:54:51 -0400 |
commit | 2e59389704cd1e46101f7ffda2dac3f44f2fa332 (patch) | |
tree | 2ec4afe667eb58b3eca7be70ec4522af44ca068c /test/boot | |
parent | 699b0acb522fd808b67b745b541bacf18c275d15 (diff) | |
download | u-boot-2e59389704cd1e46101f7ffda2dac3f44f2fa332.tar.gz u-boot-2e59389704cd1e46101f7ffda2dac3f44f2fa332.tar.bz2 u-boot-2e59389704cd1e46101f7ffda2dac3f44f2fa332.zip |
expo: Support simple themes
It is a pain to manually set the fonts of all objects to be consistent.
Some spacing settings are also better set globally than by manually
positioning each object.
Add a 'theme' to the expo, to hold this information. For now it includes
only the font size.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test/boot')
-rw-r--r-- | test/boot/expo.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/boot/expo.c b/test/boot/expo.c index 493d050baf..c0ef03b591 100644 --- a/test/boot/expo.c +++ b/test/boot/expo.c @@ -226,7 +226,7 @@ static int expo_object(struct unit_test_state *uts) } BOOTSTD_TEST(expo_object, UT_TESTF_DM | UT_TESTF_SCAN_FDT); -/* Check setting object attributes */ +/* Check setting object attributes and using themes */ static int expo_object_attr(struct unit_test_state *uts) { struct scene_obj_menu *menu; @@ -236,6 +236,7 @@ static int expo_object_attr(struct unit_test_state *uts) struct expo *exp; ulong start_mem; char name[100]; + ofnode node; char *data; int id; @@ -273,6 +274,11 @@ static int expo_object_attr(struct unit_test_state *uts) ut_asserteq(-ENOENT, scene_menu_set_title(scn, OBJ_TEXT2, OBJ_TEXT)); ut_asserteq(-EINVAL, scene_menu_set_title(scn, OBJ_MENU, OBJ_TEXT2)); + node = ofnode_path("/bootstd/theme"); + ut_assert(ofnode_valid(node)); + ut_assertok(expo_apply_theme(exp, node)); + ut_asserteq(30, txt->font_size); + expo_destroy(exp); ut_assertok(ut_check_delta(start_mem)); |