From 994827ab827549cccddbc8eb1b4ecc567d37999f Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sat, 23 May 2020 21:31:50 +0100 Subject: [PATCH] NS colour: Add colour scheme for text inputs. --- utils/nscolour.c | 8 ++++++++ utils/nscolour.h | 3 +++ 2 files changed, 11 insertions(+) diff --git a/utils/nscolour.c b/utils/nscolour.c index e66fbf838..0b36bab79 100644 --- a/utils/nscolour.c +++ b/utils/nscolour.c @@ -183,6 +183,14 @@ nserror nscolour_update(void) return res; } + nscolours[NSCOLOUR_TEXT_INPUT_BG] = + colour_to_bw_nearest(nscolours[NSCOLOUR_WIN_EVEN_BG]); + nscolours[NSCOLOUR_TEXT_INPUT_FG] = + colour_to_bw_nearest(nscolours[NSCOLOUR_WIN_EVEN_FG]); + nscolours[NSCOLOUR_TEXT_INPUT_FG_SUBTLE] = + blend_colour(nscolours[NSCOLOUR_TEXT_INPUT_BG], + nscolours[NSCOLOUR_TEXT_INPUT_FG]); + return NSERROR_OK; } diff --git a/utils/nscolour.h b/utils/nscolour.h index 910d7f7a5..855a39806 100644 --- a/utils/nscolour.h +++ b/utils/nscolour.h @@ -47,6 +47,9 @@ enum nscolour { NSCOLOUR_WIN_EVEN_FG_GOOD, NSCOLOUR_WIN_EVEN_FG_BAD, NSCOLOUR_WIN_EVEN_BORDER, + NSCOLOUR_TEXT_INPUT_BG, + NSCOLOUR_TEXT_INPUT_FG, + NSCOLOUR_TEXT_INPUT_FG_SUBTLE, NSCOLOUR_SEL_BG, NSCOLOUR_SEL_FG, NSCOLOUR_SEL_FG_SUBTLE,