[Concept,22/27] expo: Combine textline and textedit switch cases

Message ID 20260119204130.3972647-23-sjg@u-boot.org
State New
Headers
Series Expo debugging and textedit improvements (part E) |

Commit Message

Simon Glass Jan. 19, 2026, 8:41 p.m. UTC
  From: Simon Glass <simon.glass@canonical.com>

Combine the TEXTLINE and TEXTEDIT cases in scene_obj_render() and
scene_apply_theme() since they have identical handling.

Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
---

 boot/scene.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
  

Patch

diff --git a/boot/scene.c b/boot/scene.c
index ae3851cc82c..b05291138ed 100644
--- a/boot/scene.c
+++ b/boot/scene.c
@@ -786,6 +786,7 @@  static int scene_obj_render(struct scene_obj *obj, bool text_mode)
 		break;
 	}
 	case SCENEOBJT_TEXTLINE:
+	case SCENEOBJT_TEXTEDIT:
 		if (obj->flags & SCENEOF_OPEN)
 			scene_render_background(obj, true, false);
 		break;
@@ -796,10 +797,6 @@  static int scene_obj_render(struct scene_obj *obj, bool text_mode)
 			       obj->bbox.y1, box->width, vid_priv->colour_fg, box->fill);
 		break;
 	}
-	case SCENEOBJT_TEXTEDIT:
-		if (obj->flags & SCENEOF_OPEN)
-			scene_render_background(obj, true, false);
-		break;
 	}
 
 	return 0;
@@ -1621,10 +1618,7 @@  int scene_apply_theme(struct scene *scn, struct expo_theme *theme)
 		case SCENEOBJT_MENU:
 		case SCENEOBJT_BOX:
 		case SCENEOBJT_TEXTLINE:
-			break;
 		case SCENEOBJT_TEXTEDIT:
-			scene_txted_set_font(scn, obj->id, NULL,
-					     theme->font_size);
 			break;
 		case SCENEOBJT_TEXT:
 			scene_txt_set_font(scn, obj->id, NULL,