summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/menus/theme_menu.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/apps/menus/theme_menu.c b/apps/menus/theme_menu.c
index 21f7ba4..0c01b54 100644
--- a/apps/menus/theme_menu.c
+++ b/apps/menus/theme_menu.c
@@ -79,9 +79,16 @@ static struct colour_info
*/
static int set_color_func(void* color)
{
- int res, c = (intptr_t)color;
+ int res, c = (intptr_t)color, banned_color=-1;
+
+ /* Don't let foreground be set the same as background and vice-versa */
+ if (c == COLOR_BG)
+ banned_color = *colors[COLOR_FG].setting;
+ else if (c == COLOR_FG)
+ banned_color = *colors[COLOR_BG].setting;
+
res = (int)set_color(&screens[SCREEN_MAIN],str(colors[c].lang_id),
- colors[c].setting,*colors[c].setting);
+ colors[c].setting, banned_color);
settings_save();
settings_apply(false);
return res;