The expo now has all that is needed to apply a suitable theme, so drop this unnecessary code. Any further tweaks can be added to the generic expo code.
Signed-off-by: Simon Glass <s...@chromium.org> --- boot/bootflow_menu.c | 43 ------------------------------------------- test/boot/bootflow.c | 2 +- 2 files changed, 1 insertion(+), 44 deletions(-) diff --git a/boot/bootflow_menu.c b/boot/bootflow_menu.c index 03ea24f4778..6cd378f8d39 100644 --- a/boot/bootflow_menu.c +++ b/boot/bootflow_menu.c @@ -211,43 +211,6 @@ int bootflow_menu_add_all(struct expo *exp) return 0; } -int bootflow_menu_apply_theme(struct expo *exp, ofnode node) -{ - struct menu_priv *priv = exp->priv; - struct scene *scn; - u32 font_size; - int ret; - - log_debug("Applying theme %s\n", ofnode_get_name(node)); - scn = expo_lookup_scene_id(exp, MAIN); - if (!scn) - return log_msg_ret("scn", -ENOENT); - - /* Avoid error-checking optional items */ - if (!ofnode_read_u32(node, "font-size", &font_size)) { - int i; - - log_debug("font size %d\n", font_size); - scene_txt_set_font(scn, OBJ_PROMPT1A, NULL, font_size); - scene_txt_set_font(scn, OBJ_POINTER, NULL, font_size); - for (i = 0; i < priv->num_bootflows; i++) { - ret = scene_txt_set_font(scn, ITEM_DESC + i, NULL, - font_size); - if (ret) - return log_msg_ret("des", ret); - scene_txt_set_font(scn, ITEM_KEY + i, NULL, font_size); - scene_txt_set_font(scn, ITEM_LABEL + i, NULL, - font_size); - } - } - - ret = scene_arrange(scn); - if (ret) - return log_msg_ret("arr", ret); - - return 0; -} - int bootflow_menu_setup(struct bootstd_priv *std, bool text_mode, struct expo **expp) { @@ -257,12 +220,6 @@ int bootflow_menu_setup(struct bootstd_priv *std, bool text_mode, LOGR("bmn", bootflow_menu_new(&exp)); - if (ofnode_valid(std->theme)) { - ret = bootflow_menu_apply_theme(exp, std->theme); - if (ret) - return log_msg_ret("thm", ret); - } - /* For now we only support a video console */ ret = uclass_first_device_err(UCLASS_VIDEO, &dev); if (ret) diff --git a/test/boot/bootflow.c b/test/boot/bootflow.c index c477c1c1e09..d3efea2cd78 100644 --- a/test/boot/bootflow.c +++ b/test/boot/bootflow.c @@ -884,7 +884,7 @@ static int bootflow_menu_theme(struct unit_test_state *uts) ut_assertok(bootflow_menu_add_all(exp)); node = ofnode_path("/bootstd/theme"); ut_assert(ofnode_valid(node)); - ut_assertok(bootflow_menu_apply_theme(exp, node)); + ut_assertok(expo_apply_theme(exp, node)); scn = expo_lookup_scene_id(exp, MAIN); ut_assertnonnull(scn); -- 2.43.0