mirror of
https://github.com/fltk/fltk.git
synced 2026-05-18 08:13:45 +08:00
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
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user