summaryrefslogtreecommitdiff
path: root/fluid/CodeEditor.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'fluid/CodeEditor.cxx')
-rw-r--r--fluid/CodeEditor.cxx13
1 files changed, 13 insertions, 0 deletions
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);
+}
+
+