From e8d218109e246b14df0cdf2d818e2575c8108e9f Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Tue, 24 Oct 2023 14:28:56 +0200 Subject: FLUID: Adds much more detailed CodeView in preparation for "find" and "reveal" --- fluid/CodeEditor.cxx | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'fluid/CodeEditor.cxx') diff --git a/fluid/CodeEditor.cxx b/fluid/CodeEditor.cxx index 119090628..2243db2fe 100644 --- a/fluid/CodeEditor.cxx +++ b/fluid/CodeEditor.cxx @@ -316,3 +316,16 @@ TextViewer::~TextViewer() { buffer(0); delete buf; } + +/** + Tricking Fl_Text_Display into using bearable colors for this specific task. + */ +void TextViewer::draw() +{ + Fl_Color c = Fl::get_color(FL_SELECTION_COLOR); + Fl::set_color(FL_SELECTION_COLOR, fl_color_average(FL_BACKGROUND_COLOR, FL_FOREGROUND_COLOR, 0.9f)); + Fl_Text_Display::draw(); + Fl::set_color(FL_SELECTION_COLOR, c); +} + + -- cgit v1.2.3