diff options
author | Simon Glass <sjg@chromium.org> | 2023-06-01 19:23:00 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-07-14 19:54:51 +0300 |
commit | 7230fdb3837ad745adff4cf129dd04e893fe0a36 (patch) | |
tree | bcc1e33d0dddea62b60e1175e2a6c2c72865cef5 /boot/scene.c | |
parent | 4e64beeba7de7720b42714cbc542c9f7dfbba841 (diff) | |
download | u-boot-7230fdb3837ad745adff4cf129dd04e893fe0a36.tar.xz |
expo: Add spacing around menus and items
It looks better if menus have a bit of an inset, rather than be drawn hard
up against the background. Also, menu items look better if they have a bit
of spacing between them.
Add theme options for these and implement the required changes.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'boot/scene.c')
-rw-r--r-- | boot/scene.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/boot/scene.c b/boot/scene.c index ea94b90584..6fbc1fc578 100644 --- a/boot/scene.c +++ b/boot/scene.c @@ -309,6 +309,7 @@ static int scene_obj_render(struct scene_obj *obj, bool text_mode) { struct scene *scn = obj->scene; struct expo *exp = scn->expo; + const struct expo_theme *theme = &exp->theme; struct udevice *dev = exp->display; struct udevice *cons = text_mode ? NULL : exp->cons; int x, y, ret; @@ -363,8 +364,9 @@ static int scene_obj_render(struct scene_obj *obj, bool text_mode) vid_priv = dev_get_uclass_priv(dev); if (obj->flags & SCENEOF_POINT) { vidconsole_push_colour(cons, fore, back, &old); - video_fill_part(dev, x, y, - x + obj->dim.w, y + obj->dim.h, + video_fill_part(dev, x - theme->menu_inset, y, + x + obj->dim.w, + y + obj->dim.h, vid_priv->colour_bg); } vidconsole_set_cursor_pos(cons, x, y); |