From ae42fe99797a0102b95f5b7f700b1a2cb53d4bd2 Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Sun, 9 Nov 2025 22:24:03 +0200
Subject: [PATCH 27/27] sdl: Fix combo widget text placement

See RM #1727

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
---
 client/gui-sdl2/widget_combo.c | 2 +-
 client/gui-sdl3/widget_combo.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/client/gui-sdl2/widget_combo.c b/client/gui-sdl2/widget_combo.c
index 6a1f6cb4af..e4b5949b22 100644
--- a/client/gui-sdl2/widget_combo.c
+++ b/client/gui-sdl2/widget_combo.c
@@ -71,7 +71,7 @@ static int combo_redraw(struct widget *combo)
   /* Set position and blit text. */
   text = create_text_surf_from_utf8(combo->string_utf8);
   if (NULL != text) {
-    dest.y += (surface->h - surface->h) / 2;
+    dest.y += (surface->h - text->h) / 2;
     /* Blit centred text to bottom. */
     if (combo->string_utf8->style & SF_CENTER) {
       dest.x += (surface->w - text->w) / 2;
diff --git a/client/gui-sdl3/widget_combo.c b/client/gui-sdl3/widget_combo.c
index 9340bcc85f..dcbae990e7 100644
--- a/client/gui-sdl3/widget_combo.c
+++ b/client/gui-sdl3/widget_combo.c
@@ -67,7 +67,7 @@ static int combo_redraw(struct widget *combo)
   /* Set position and blit text. */
   text = create_text_surf_from_utf8(combo->string_utf8);
   if (NULL != text) {
-    dest.y += (surface->h - surface->h) / 2;
+    dest.y += (surface->h - text->h) / 2;
     /* Blit centred text to bottom. */
     if (combo->string_utf8->style & SF_CENTER) {
       dest.x += (surface->w - text->w) / 2;
-- 
2.51.0

