[PATCH v2 45/60] expo: Support white-on-black in the theme

Simon Glass sjg at chromium.org
Fri May 2 16:46:43 CEST 2025


Allow this setting to be controlled from the theme.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

(no changes since v1)

 boot/expo.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/boot/expo.c b/boot/expo.c
index 4404fcb67e9..7dbcac78c22 100644
--- a/boot/expo.c
+++ b/boot/expo.c
@@ -277,6 +277,7 @@ int expo_apply_theme(struct expo *exp, ofnode node)
 {
 	struct scene *scn;
 	struct expo_theme *theme = &exp->theme;
+	bool white_on_black;
 	int ret;
 
 	log_debug("Applying theme %s\n", ofnode_get_name(node));
@@ -287,6 +288,9 @@ int expo_apply_theme(struct expo *exp, ofnode node)
 	ofnode_read_u32(node, "menuitem-gap-y", &theme->menuitem_gap_y);
 	ofnode_read_u32(node, "menu-title-margin-x",
 			&theme->menu_title_margin_x);
+	white_on_black = ofnode_read_bool(node, "white-on-black");
+	if (exp->display)
+		video_set_white_on_black(exp->display, white_on_black);
 
 	list_for_each_entry(scn, &exp->scene_head, sibling) {
 		ret = scene_apply_theme(scn, theme);
-- 
2.43.0



More information about the U-Boot mailing list