From 37c50ef7fcae06d970136d0ac57c98008fb66946 Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Wed, 31 Jan 2024 02:51:57 +0200
Subject: [PATCH 26/26] sdl2/3: Rename FONTO_SLIGHTLY_BIGGER as
 FONTO_DEFAULT_PLUS

See RM #212

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
---
 client/gui-sdl2/citydlg.c    | 4 ++--
 client/gui-sdl2/gui_string.c | 2 +-
 client/gui-sdl2/gui_string.h | 3 ++-
 client/gui-sdl2/repodlgs.c   | 4 ++--
 client/gui-sdl3/citydlg.c    | 4 ++--
 client/gui-sdl3/gui_string.c | 2 +-
 client/gui-sdl3/gui_string.h | 3 ++-
 client/gui-sdl3/repodlgs.c   | 4 ++--
 8 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/client/gui-sdl2/citydlg.c b/client/gui-sdl2/citydlg.c
index 90b0a4bf3a..d0f50c9567 100644
--- a/client/gui-sdl2/citydlg.c
+++ b/client/gui-sdl2/citydlg.c
@@ -1002,7 +1002,7 @@ static void create_city_options_widget_list(struct city *pcity)
   /* ----- */
 
   fc_snprintf(cbuf, sizeof(cbuf), "%s:", _("New citizens produce"));
-  pstr = create_utf8_from_char_fonto(cbuf, FONTO_SLIGHTLY_BIGGER);
+  pstr = create_utf8_from_char_fonto(cbuf, FONTO_DEFAULT_PLUS);
   pstr->style |= SF_CENTER;
 
   if (BV_ISSET(pcity->city_options, CITYO_SCIENCE_SPECIALISTS)) {
@@ -1958,7 +1958,7 @@ static void redraw_info_city_dialog(struct widget *city_window,
 
   FREESURFACE(surf);
 
-  change_fonto_utf8(pstr, FONTO_SLIGHTLY_BIGGER);
+  change_fonto_utf8(pstr, FONTO_DEFAULT_PLUS);
   pstr->fgcol = *get_theme_color(COLOR_THEME_CITYDLG_INFOPANEL);
 
   if (pcity->pollution) {
diff --git a/client/gui-sdl2/gui_string.c b/client/gui-sdl2/gui_string.c
index 31eadb3f7c..7a7bc97ab6 100644
--- a/client/gui-sdl2/gui_string.c
+++ b/client/gui-sdl2/gui_string.c
@@ -173,7 +173,7 @@ static Uint16 fonto_ptsize(enum font_origin origin)
   case FONTO_DEFAULT:
     /* Rely on create_utf8_str() default */
     return 0;
-  case FONTO_SLIGHTLY_BIGGER:
+  case FONTO_DEFAULT_PLUS:
     def = ptsize_default();
     return adj_font(MAX(def + 0, def * 1.1)); /* Same as def, when def < 10 */
   case FONTO_ATTENTION:
diff --git a/client/gui-sdl2/gui_string.h b/client/gui-sdl2/gui_string.h
index ac16a4875a..84a5fe8081 100644
--- a/client/gui-sdl2/gui_string.h
+++ b/client/gui-sdl2/gui_string.h
@@ -60,9 +60,10 @@ typedef struct utf8_str {
   char *text;
 } utf8_str;
 
+/* .._PLUS might end up being same as its base size */
 enum font_origin {
   FONTO_DEFAULT,
-  FONTO_SLIGHTLY_BIGGER,
+  FONTO_DEFAULT_PLUS,
   FONTO_ATTENTION,
   FONTO_ATTENTION_PLUS,
   FONTO_HEADING,
diff --git a/client/gui-sdl2/repodlgs.c b/client/gui-sdl2/repodlgs.c
index ad0a0abde1..239cf16694 100644
--- a/client/gui-sdl2/repodlgs.c
+++ b/client/gui-sdl2/repodlgs.c
@@ -2018,7 +2018,7 @@ void economy_report_dialog_popup(bool make_modal)
 
   /* It is important to leave 1 space at the end of this string. */
   fc_snprintf(cbuf, sizeof(cbuf), "%d%% ", client.conn.playing->economic.luxury);
-  pstr = create_utf8_from_char_fonto(cbuf, FONTO_SLIGHTLY_BIGGER);
+  pstr = create_utf8_from_char_fonto(cbuf, FONTO_DEFAULT_PLUS);
   pstr->style |= TTF_STYLE_BOLD;
 
   buf = create_iconlabel(icons->big_luxury, pwindow->dst, pstr,
@@ -2063,7 +2063,7 @@ void economy_report_dialog_popup(bool make_modal)
   /* Science rate iconlabel */
   /* It is important to leave 1 space at the end of this string */
   fc_snprintf(cbuf, sizeof(cbuf), "%d%% ", client.conn.playing->economic.science);
-  pstr = create_utf8_from_char_fonto(cbuf, FONTO_SLIGHTLY_BIGGER);
+  pstr = create_utf8_from_char_fonto(cbuf, FONTO_DEFAULT_PLUS);
   pstr->style |= TTF_STYLE_BOLD;
 
   buf = create_iconlabel(icons->big_colb, pwindow->dst, pstr,
diff --git a/client/gui-sdl3/citydlg.c b/client/gui-sdl3/citydlg.c
index f7d349a54c..010db20a41 100644
--- a/client/gui-sdl3/citydlg.c
+++ b/client/gui-sdl3/citydlg.c
@@ -998,7 +998,7 @@ static void create_city_options_widget_list(struct city *pcity)
   /* ----- */
 
   fc_snprintf(cbuf, sizeof(cbuf), "%s:", _("New citizens produce"));
-  pstr = create_utf8_from_char_fonto(cbuf, FONTO_SLIGHTLY_BIGGER);
+  pstr = create_utf8_from_char_fonto(cbuf, FONTO_DEFAULT_PLUS);
   pstr->style |= SF_CENTER;
 
   if (BV_ISSET(pcity->city_options, CITYO_SCIENCE_SPECIALISTS)) {
@@ -1954,7 +1954,7 @@ static void redraw_info_city_dialog(struct widget *city_window,
 
   FREESURFACE(surf);
 
-  change_fonto_utf8(pstr, FONTO_SLIGHTLY_BIGGER);
+  change_fonto_utf8(pstr, FONTO_DEFAULT_PLUS);
   pstr->fgcol = *get_theme_color(COLOR_THEME_CITYDLG_INFOPANEL);
 
   if (pcity->pollution) {
diff --git a/client/gui-sdl3/gui_string.c b/client/gui-sdl3/gui_string.c
index fd54a4ad2a..d3ba42ad4f 100644
--- a/client/gui-sdl3/gui_string.c
+++ b/client/gui-sdl3/gui_string.c
@@ -169,7 +169,7 @@ static Uint16 fonto_ptsize(enum font_origin origin)
   case FONTO_DEFAULT:
     /* Rely on create_utf8_str() default */
     return 0;
-  case FONTO_SLIGHTLY_BIGGER:
+  case FONTO_DEFAULT_PLUS:
     def = ptsize_default();
     return adj_font(MAX(def + 0, def * 1.1)); /* Same as def, when def < 10 */
   case FONTO_ATTENTION:
diff --git a/client/gui-sdl3/gui_string.h b/client/gui-sdl3/gui_string.h
index eb0e91d019..41b9969cac 100644
--- a/client/gui-sdl3/gui_string.h
+++ b/client/gui-sdl3/gui_string.h
@@ -55,9 +55,10 @@ typedef struct utf8_str {
   char *text;
 } utf8_str;
 
+/* .._PLUS might end up being same as its base size */
 enum font_origin {
   FONTO_DEFAULT,
-  FONTO_SLIGHTLY_BIGGER,
+  FONTO_DEFAULT_PLUS,
   FONTO_ATTENTION,
   FONTO_ATTENTION_PLUS,
   FONTO_HEADING,
diff --git a/client/gui-sdl3/repodlgs.c b/client/gui-sdl3/repodlgs.c
index 77c247b38d..ffa8bd3e1f 100644
--- a/client/gui-sdl3/repodlgs.c
+++ b/client/gui-sdl3/repodlgs.c
@@ -2018,7 +2018,7 @@ void economy_report_dialog_popup(bool make_modal)
 
   /* It is important to leave 1 space at the end of this string. */
   fc_snprintf(cbuf, sizeof(cbuf), "%d%% ", client.conn.playing->economic.luxury);
-  pstr = create_utf8_from_char_fonto(cbuf, FONTO_SLIGHTLY_BIGGER);
+  pstr = create_utf8_from_char_fonto(cbuf, FONTO_DEFAULT_PLUS);
   pstr->style |= TTF_STYLE_BOLD;
 
   buf = create_iconlabel(icons->big_luxury, pwindow->dst, pstr,
@@ -2063,7 +2063,7 @@ void economy_report_dialog_popup(bool make_modal)
   /* Science rate iconlabel */
   /* It is important to leave 1 space at the end of this string */
   fc_snprintf(cbuf, sizeof(cbuf), "%d%% ", client.conn.playing->economic.science);
-  pstr = create_utf8_from_char_fonto(cbuf, FONTO_SLIGHTLY_BIGGER);
+  pstr = create_utf8_from_char_fonto(cbuf, FONTO_DEFAULT_PLUS);
   pstr->style |= TTF_STYLE_BOLD;
 
   buf = create_iconlabel(icons->big_colb, pwindow->dst, pstr,
-- 
2.43.0

