expo: Move menu dims calculations into scene_menu_arrange()

A menu's dimensions are currently only used for positioning the
component parts of the menu, i.e. the label, key, description and
preview.

Move the logic for this entirely into the scene_menu file and drop the
logic at the top level.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2025-05-05 17:42:49 +02:00
parent bd5e1e62e8
commit a6ec4daf24
3 changed files with 38 additions and 49 deletions

View File

@@ -1043,18 +1043,8 @@ int scene_calc_dims(struct scene *scn)
}
break;
}
case SCENEOBJT_MENU: {
struct scene_obj_menu *menu;
if (do_menus) {
menu = (struct scene_obj_menu *)obj;
ret = scene_menu_calc_dims(menu);
if (ret)
return log_msg_ret("men", ret);
}
case SCENEOBJT_MENU:
break;
}
case SCENEOBJT_TEXTLINE: {
struct scene_obj_textline *tline;