From ac61a1d21979684904b74fe6751cd168bf16149d Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Fri, 3 May 2024 18:47:18 +0300 Subject: [PATCH 34/34] sdl: Add theme color for plrdlg "No Contact" state See osdn #45038 Signed-off-by: Marko Lindqvist --- client/gui-sdl2/plrdlg.c | 3 +-- client/gui-sdl2/themecolors.c | 1 + client/gui-sdl2/themecolors.h | 5 +++-- client/gui-sdl3/plrdlg.c | 3 +-- client/gui-sdl3/themecolors.c | 1 + client/gui-sdl3/themecolors.h | 5 +++-- data/themes/gui-sdl2/human/colors.themespec | 4 ++++ 7 files changed, 14 insertions(+), 8 deletions(-) diff --git a/client/gui-sdl2/plrdlg.c b/client/gui-sdl2/plrdlg.c index 3b7a9ed584..fe6f0f5e7d 100644 --- a/client/gui-sdl2/plrdlg.c +++ b/client/gui-sdl2/plrdlg.c @@ -776,8 +776,7 @@ void popup_players_nations_dialog(void) buf->string_utf8->fgcol = *get_theme_color(COLOR_THEME_PLRDLG_ALLIANCE); break; case DS_NO_CONTACT: - /* TODO: Add a color for this. Widget is not disabled! */ - buf->string_utf8->fgcol = *(get_theme_color(COLOR_THEME_WIDGET_DISABLED_TEXT)); + buf->string_utf8->fgcol = *(get_theme_color(COLOR_THEME_PLRDLG_NO_CONTACT)); break; case DS_TEAM: case DS_LAST: diff --git a/client/gui-sdl2/themecolors.c b/client/gui-sdl2/themecolors.c index d5fc09bea3..cdca6bd7b4 100644 --- a/client/gui-sdl2/themecolors.c +++ b/client/gui-sdl2/themecolors.c @@ -129,6 +129,7 @@ static char *color_names[] = { "plrdlg_text", "plrdlg_war", "plrdlg_war_restricted", + "plrdlg_no_contact", "revolutiondlg_text", "sabotagedlg_separator", "sciencedlg_frame", diff --git a/client/gui-sdl2/themecolors.h b/client/gui-sdl2/themecolors.h index 9dc4b6b837..d63a0af284 100644 --- a/client/gui-sdl2/themecolors.h +++ b/client/gui-sdl2/themecolors.h @@ -1,4 +1,4 @@ -/********************************************************************** +/*********************************************************************** Freeciv - Copyright (C) 2005 - The Freeciv Project This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -110,7 +110,8 @@ enum theme_color { COLOR_THEME_PLRDLG_PEACE, COLOR_THEME_PLRDLG_TEXT, COLOR_THEME_PLRDLG_WAR, - COLOR_THEME_PLRDLG_WAR_RESTRICTED, /* player at war but can't meet or get intel. data */ + COLOR_THEME_PLRDLG_WAR_RESTRICTED, /* Player at war but can't meet or get intel. data */ + COLOR_THEME_PLRDLG_NO_CONTACT, COLOR_THEME_REVOLUTIONDLG_TEXT, COLOR_THEME_SABOTAGEDLG_SEPARATOR, COLOR_THEME_SCIENCEDLG_FRAME, diff --git a/client/gui-sdl3/plrdlg.c b/client/gui-sdl3/plrdlg.c index 0ea017bb67..ceaad9c185 100644 --- a/client/gui-sdl3/plrdlg.c +++ b/client/gui-sdl3/plrdlg.c @@ -772,8 +772,7 @@ void popup_players_nations_dialog(void) buf->string_utf8->fgcol = *get_theme_color(COLOR_THEME_PLRDLG_ALLIANCE); break; case DS_NO_CONTACT: - /* TODO: Add a color for this. Widget is not disabled! */ - buf->string_utf8->fgcol = *(get_theme_color(COLOR_THEME_WIDGET_DISABLED_TEXT)); + buf->string_utf8->fgcol = *(get_theme_color(COLOR_THEME_PLRDLG_NO_CONTACT)); break; case DS_TEAM: case DS_LAST: diff --git a/client/gui-sdl3/themecolors.c b/client/gui-sdl3/themecolors.c index 3456fc0c55..d9fc23c243 100644 --- a/client/gui-sdl3/themecolors.c +++ b/client/gui-sdl3/themecolors.c @@ -129,6 +129,7 @@ static char *color_names[] = { "plrdlg_text", "plrdlg_war", "plrdlg_war_restricted", + "plrdlg_no_contact", "revolutiondlg_text", "sabotagedlg_separator", "sciencedlg_frame", diff --git a/client/gui-sdl3/themecolors.h b/client/gui-sdl3/themecolors.h index 9dc4b6b837..d63a0af284 100644 --- a/client/gui-sdl3/themecolors.h +++ b/client/gui-sdl3/themecolors.h @@ -1,4 +1,4 @@ -/********************************************************************** +/*********************************************************************** Freeciv - Copyright (C) 2005 - The Freeciv Project This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -110,7 +110,8 @@ enum theme_color { COLOR_THEME_PLRDLG_PEACE, COLOR_THEME_PLRDLG_TEXT, COLOR_THEME_PLRDLG_WAR, - COLOR_THEME_PLRDLG_WAR_RESTRICTED, /* player at war but can't meet or get intel. data */ + COLOR_THEME_PLRDLG_WAR_RESTRICTED, /* Player at war but can't meet or get intel. data */ + COLOR_THEME_PLRDLG_NO_CONTACT, COLOR_THEME_REVOLUTIONDLG_TEXT, COLOR_THEME_SABOTAGEDLG_SEPARATOR, COLOR_THEME_SCIENCEDLG_FRAME, diff --git a/data/themes/gui-sdl2/human/colors.themespec b/data/themes/gui-sdl2/human/colors.themespec index d98615026f..2b54e06872 100644 --- a/data/themes/gui-sdl2/human/colors.themespec +++ b/data/themes/gui-sdl2/human/colors.themespec @@ -344,6 +344,10 @@ plrdlg_frame = {"r", "g", "b", "a" 160, 150, 126, 255 } +plrdlg_no_contact = {"r", "g", "b", "a" + 50, 50, 50, 255 +} + plrdlg_peace = {"r", "g", "b", "a" 0, 200, 0, 255 } -- 2.43.0