commit 12c984cff816ca46aff78ddeb9a7ce018cf4bc5c
Author: Simon Howard <fraggle@soulsphere.org>
AuthorDate: Fri Dec 28 16:25:55 2018 -0500
Commit: Simon Howard <fraggle@soulsphere.org>
CommitDate: Fri Dec 28 16:25:55 2018 -0500
textscreen: Use cyan bg for window action hover.
This makes the hover background consistent with other widgets instead
of giving a black background that is inconsistent. As part of this,
change the foreground text color when hovering so that the foreground
does not clash with the background, and the text stays readable.
---
textscreen/txt_window_action.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/textscreen/txt_window_action.c b/textscreen/txt_window_action.c
index eca0119e..80c3ced4 100644
--- a/textscreen/txt_window_action.c
+++ b/textscreen/txt_window_action.c
@@ -43,17 +43,16 @@ static void TXT_WindowActionSizeCalc(TXT_UNCAST_ARG(action))
static void TXT_WindowActionDrawer(TXT_UNCAST_ARG(action))
{
TXT_CAST_ARG(txt_window_action_t, action);
+ int hovering;
char buf[10];
TXT_GetKeyDescription(action->key, buf, sizeof(buf));
- if (TXT_HoveringOverWidget(action))
- {
- TXT_BGColor(TXT_COLOR_BLACK, 0);
- }
+ hovering = TXT_HoveringOverWidget(action);
+ TXT_SetWidgetBG(action);
TXT_DrawString(" ");
- TXT_FGColor(TXT_COLOR_BRIGHT_GREEN);
+ TXT_FGColor(hovering ? TXT_COLOR_BRIGHT_WHITE : TXT_COLOR_BRIGHT_GREEN);
TXT_DrawString(buf);
TXT_FGColor(TXT_COLOR_BRIGHT_CYAN);
TXT_DrawString("=");