From 4480d3e5f218d544e1c95716eb1ccaa0a48e4104 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sun, 16 May 2021 11:51:42 +0300 Subject: [PATCH 29/29] Improve indentation of entries in the left panel of city dialog See osdn #42298 Signed-off-by: Marko Lindqvist --- client/citydlg_common.c | 10 +++++----- client/gui-gtk-2.0/citydlg.c | 4 ++-- client/gui-gtk-3.0/citydlg.c | 4 ++-- client/gui-gtk-3.22/citydlg.c | 4 ++-- client/gui-qt/citydlg.cpp | 4 ++-- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/client/citydlg_common.c b/client/citydlg_common.c index c2f60ad115..14f5cc2f23 100644 --- a/client/citydlg_common.c +++ b/client/citydlg_common.c @@ -752,7 +752,7 @@ void get_city_dialog_airlift_value(const struct city *pcity, /* TRANS: airlift. Possible take offs text. String is a symbol that * indicates that terms and conditions apply when landings are limited * and empty when they aren't limited. */ - fc_snprintf(src, sizeof(src), _("∞%s"), + fc_snprintf(src, sizeof(src), _(" ∞%s"), game.info.airlifting_style & AIRLIFTING_UNLIMITED_DEST /* TRANS: airlift unlimited take offs may be spent symbol * used above. */ @@ -760,7 +760,7 @@ void get_city_dialog_airlift_value(const struct city *pcity, } else { /* TRANS: airlift. Possible take offs text. Number is * airlift capacity. */ - fc_snprintf(src, sizeof(src), _("%d"), pcity->airlift); + fc_snprintf(src, sizeof(src), _("%4d"), pcity->airlift); } if (game.info.airlifting_style & AIRLIFTING_UNLIMITED_DEST) { @@ -770,16 +770,16 @@ void get_city_dialog_airlift_value(const struct city *pcity, unlimited++; /* TRANS: airlift. Possible landings text. */ - fc_snprintf(dest, sizeof(dest), _("∞")); + fc_snprintf(dest, sizeof(dest), _(" ∞")); } else { /* TRANS: airlift. Possible landings text. */ - fc_snprintf(dest, sizeof(dest), _("%d"), pcity->airlift); + fc_snprintf(dest, sizeof(dest), _("%4d"), pcity->airlift); } switch (unlimited) { case 2: /* TRANS: unlimited airlift take offs and landings */ - fc_snprintf(buf, bufsz, _("∞")); + fc_snprintf(buf, bufsz, _(" ∞")); break; case 1: /* TRANS: airlift take offs and landings. One is unlimited. The first diff --git a/client/gui-gtk-2.0/citydlg.c b/client/gui-gtk-2.0/citydlg.c index 0db6e57d40..66dfa2ca9b 100644 --- a/client/gui-gtk-2.0/citydlg.c +++ b/client/gui-gtk-2.0/citydlg.c @@ -1593,11 +1593,11 @@ static void city_dialog_update_information(GtkWidget **info_ebox, fc_snprintf(buf[POLLUTION], sizeof(buf[POLLUTION]), "%4d", pcity->pollution); if (!game.info.illness_on) { - fc_snprintf(buf[ILLNESS], sizeof(buf[ILLNESS]), " -.-"); + fc_snprintf(buf[ILLNESS], sizeof(buf[ILLNESS]), " -.-"); } else { illness = city_illness_calc(pcity, NULL, NULL, NULL, NULL); /* illness is in tenth of percent */ - fc_snprintf(buf[ILLNESS], sizeof(buf[ILLNESS]), "%4.1f%%", + fc_snprintf(buf[ILLNESS], sizeof(buf[ILLNESS]), "%5.1f%%", (float)illness / 10.0); } diff --git a/client/gui-gtk-3.0/citydlg.c b/client/gui-gtk-3.0/citydlg.c index 21446bc75f..da923e2313 100644 --- a/client/gui-gtk-3.0/citydlg.c +++ b/client/gui-gtk-3.0/citydlg.c @@ -1830,11 +1830,11 @@ static void city_dialog_update_information(GtkWidget **info_ebox, fc_snprintf(buf[INFO_POLLUTION], sizeof(buf[INFO_POLLUTION]), "%4d", pcity->pollution); if (!game.info.illness_on) { - fc_snprintf(buf[INFO_ILLNESS], sizeof(buf[INFO_ILLNESS]), " -.-"); + fc_snprintf(buf[INFO_ILLNESS], sizeof(buf[INFO_ILLNESS]), " -.-"); } else { illness = city_illness_calc(pcity, NULL, NULL, NULL, NULL); /* illness is in tenth of percent */ - fc_snprintf(buf[INFO_ILLNESS], sizeof(buf[INFO_ILLNESS]), "%4.1f%%", + fc_snprintf(buf[INFO_ILLNESS], sizeof(buf[INFO_ILLNESS]), "%5.1f%%", (float)illness / 10.0); } diff --git a/client/gui-gtk-3.22/citydlg.c b/client/gui-gtk-3.22/citydlg.c index e93fec8415..ee272406f2 100644 --- a/client/gui-gtk-3.22/citydlg.c +++ b/client/gui-gtk-3.22/citydlg.c @@ -1864,11 +1864,11 @@ static void city_dialog_update_information(GtkWidget **info_ebox, fc_snprintf(buf[INFO_POLLUTION], sizeof(buf[INFO_POLLUTION]), "%4d", pcity->pollution); if (!game.info.illness_on) { - fc_snprintf(buf[INFO_ILLNESS], sizeof(buf[INFO_ILLNESS]), " -.-"); + fc_snprintf(buf[INFO_ILLNESS], sizeof(buf[INFO_ILLNESS]), " -.-"); } else { illness = city_illness_calc(pcity, NULL, NULL, NULL, NULL); /* illness is in tenth of percent */ - fc_snprintf(buf[INFO_ILLNESS], sizeof(buf[INFO_ILLNESS]), "%4.1f%%", + fc_snprintf(buf[INFO_ILLNESS], sizeof(buf[INFO_ILLNESS]), "%5.1f%%", (float)illness / 10.0); } diff --git a/client/gui-qt/citydlg.cpp b/client/gui-qt/citydlg.cpp index 6db0dbe447..e952a18a00 100644 --- a/client/gui-qt/citydlg.cpp +++ b/client/gui-qt/citydlg.cpp @@ -3035,12 +3035,12 @@ void city_dialog::update_info_label() pcity->pollution); if (!game.info.illness_on) { - fc_snprintf(buf_info[INFO_ILLNESS], sizeof(buf_info[INFO_ILLNESS]), " -.-"); + fc_snprintf(buf_info[INFO_ILLNESS], sizeof(buf_info[INFO_ILLNESS]), " -.-"); } else { illness = city_illness_calc(pcity, NULL, NULL, NULL, NULL); /* illness is in tenth of percent */ fc_snprintf(buf_info[INFO_ILLNESS], sizeof(buf_info[INFO_ILLNESS]), - "%4.1f%%", (float) illness / 10.0); + "%5.1f%%", (float) illness / 10.0); } get_city_dialog_airlift_value(pcity, buf_info[INFO_AIRLIFT], -- 2.30.2