From d95750ede71befba2a331b3703c43b95323737c3 Mon Sep 17 00:00:00 2001 From: Greg Ercolano Date: Mon, 13 Apr 2015 15:26:57 +0000 Subject: Fix problem with fl_contrast() affecting text color unnecessarily when drawing normal (unselected) text. (See thread on fltk.coredev started 04/07/2015, "RFC: Fl_Text_Display style buffer color weirdness") git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10698 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Text_Display.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Fl_Text_Display.cxx') diff --git a/src/Fl_Text_Display.cxx b/src/Fl_Text_Display.cxx index 2ae07fa66..c03975e11 100644 --- a/src/Fl_Text_Display.cxx +++ b/src/Fl_Text_Display.cxx @@ -2150,7 +2150,7 @@ void Fl_Text_Display::draw_string(int style, if (Fl::focus() == (Fl_Widget*)this) background = fl_color_average(color(), selection_color(), 0.5f); else background = fl_color_average(color(), selection_color(), 0.6f); } else background = color(); - foreground = fl_contrast(styleRec->color, background); + foreground = styleRec->color; } else if (style & PRIMARY_MASK) { if (Fl::focus() == (Fl_Widget*)this) background = selection_color(); else background = fl_color_average(color(), selection_color(), 0.4f); -- cgit v1.2.3