diff options
| author | Matthias Melcher <github@matthiasm.com> | 2023-10-24 14:28:56 +0200 |
|---|---|---|
| committer | Matthias Melcher <github@matthiasm.com> | 2023-10-24 14:29:01 +0200 |
| commit | e8d218109e246b14df0cdf2d818e2575c8108e9f (patch) | |
| tree | 64c3f3ae1acd99f81fd54d6391591663981c9b23 /fluid/CodeEditor.cxx | |
| parent | 5a8a28cbb5fd627dfd032b996cd83d0965d9ac5e (diff) | |
FLUID: Adds much more detailed CodeView
in preparation for "find" and "reveal"
Diffstat (limited to 'fluid/CodeEditor.cxx')
| -rw-r--r-- | fluid/CodeEditor.cxx | 13 |
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); +} + + |
