diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2015-04-04 15:06:30 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2015-04-04 15:06:30 +0000 |
| commit | c4b0a2f3bfb5f844ef5ed02fa6f8e72096f23776 (patch) | |
| tree | 08074b9f9c9c6f8d80ac4ac8d6bc8fa5d029df3a /fluid/CodeEditor.cxx | |
| parent | 326b64d278cc990e2d03ee3fb9b18dd3a630a82b (diff) | |
Tricking Fl_Text_Display into using bearable colors for CodeView in Fluid.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10672 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'fluid/CodeEditor.cxx')
| -rw-r--r-- | fluid/CodeEditor.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fluid/CodeEditor.cxx b/fluid/CodeEditor.cxx index edc3145c8..89dbe6bb6 100644 --- a/fluid/CodeEditor.cxx +++ b/fluid/CodeEditor.cxx @@ -427,6 +427,16 @@ CodeViewer::CodeViewer(int X, int Y, int W, int H, const char *L) cursor_style(CARET_CURSOR); } + +void CodeViewer::draw() +{ + // Tricking Fl_Text_Display into using bearable colors for this specific task + 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.9)); + CodeEditor::draw(); + Fl::set_color(FL_SELECTION_COLOR, c); +} + // // End of "$Id$". // |
