diff options
| author | Simon Glass <[email protected]> | 2025-05-02 08:46:36 -0600 |
|---|---|---|
| committer | Simon Glass <[email protected]> | 2025-05-30 09:49:32 +0100 |
| commit | 5ea2b533ed037b8f6f89c33f13dcf6188ba9162d (patch) | |
| tree | 27693101cd790dd29d9d2613f7ec5cce9816e200 /boot | |
| parent | e3c3f83cb6ce85ef541359fa46fd802e1b53494b (diff) | |
expo: Line up all menu objects
At present labels are lined up vertically. Do the same with keys and
descriptions, since it looks nicer.
Signed-off-by: Simon Glass <[email protected]>
Diffstat (limited to 'boot')
| -rw-r--r-- | boot/scene_menu.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/boot/scene_menu.c b/boot/scene_menu.c index e99f4426281..96ac726ebcd 100644 --- a/boot/scene_menu.c +++ b/boot/scene_menu.c @@ -190,14 +190,20 @@ int scene_menu_calc_dims(struct scene_obj_menu *menu) scene_menu_calc_bbox(menu, bbox); - /* Make all labels the same size */ - cur = &bbox[SCENEBB_label]; - if (cur->valid) { - list_for_each_entry(item, &menu->item_head, sibling) { - scene_obj_set_size(menu->obj.scene, item->label_id, - cur->x1 - cur->x0, - cur->y1 - cur->y0); - } + /* Make all field types the same width */ + list_for_each_entry(item, &menu->item_head, sibling) { + cur = &bbox[SCENEBB_label]; + if (cur->valid) + scene_obj_set_width(menu->obj.scene, item->label_id, + cur->x1 - cur->x0); + cur = &bbox[SCENEBB_key]; + if (cur->valid) + scene_obj_set_width(menu->obj.scene, item->key_id, + cur->x1 - cur->x0); + cur = &bbox[SCENEBB_desc]; + if (cur->valid) + scene_obj_set_width(menu->obj.scene, item->desc_id, + cur->x1 - cur->x0); } cur = &bbox[SCENEBB_all]; |
