diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2004-04-06 17:38:36 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2004-04-06 17:38:36 +0000 |
| commit | 7fdbfc61bee6b6a22c6c24fbd80a79cf08cdd51e (patch) | |
| tree | 88b73cfa5babd7f0178b21f88ffc321f0bf9b16e /src/Fl_Text_Display.cxx | |
| parent | 4e0450ea36afc824a57502de155165c357d72900 (diff) | |
More doco updates.
FLUID's Layout->Center In Group functionality did not properly
handle widgets that were children of a Fl_Window widget (STR
#318)
The Fl_Text_Display destructor did not remove the predelete
callback associated with the current buffer (STR #332)
Fixed several bugs in the MacOS X Fl::add_fd() handling (STR
#333, STR #337)
The Fl_Text_Display widget did not display selections set by the
application (STR #322)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3299 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Text_Display.cxx')
| -rw-r--r-- | src/Fl_Text_Display.cxx | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/Fl_Text_Display.cxx b/src/Fl_Text_Display.cxx index 9ec01939d..623efe5ec 100644 --- a/src/Fl_Text_Display.cxx +++ b/src/Fl_Text_Display.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Text_Display.cxx,v 1.12.2.49 2004/03/01 02:05:02 easysw Exp $" +// "$Id: Fl_Text_Display.cxx,v 1.12.2.50 2004/04/06 17:38:36 easysw Exp $" // // Copyright 2001-2003 by Bill Spitzak and others. // Original code Copyright Mark Edel. Permission to distribute under @@ -143,7 +143,10 @@ Fl_Text_Display::Fl_Text_Display(int X, int Y, int W, int H, const char* l) ** freed, nor are the style buffer or style table. */ Fl_Text_Display::~Fl_Text_Display() { - if (mBuffer) mBuffer->remove_modify_callback(buffer_modified_cb, this); + if (mBuffer) { + mBuffer->remove_modify_callback(buffer_modified_cb, this); + mBuffer->remove_predelete_callback(buffer_predelete_cb, this); + } if (mLineStarts) delete[] mLineStarts; } @@ -1583,13 +1586,15 @@ void Fl_Text_Display::draw_string( int style, int X, int Y, int toX, font = styleRec->font; fsize = styleRec->size; - if ( style & (HIGHLIGHT_MASK | PRIMARY_MASK) && Fl::focus() == this) { - background = selection_color(); + if (style & (HIGHLIGHT_MASK | PRIMARY_MASK)) { + if (Fl::focus() == this) background = selection_color(); + else background = fl_color_average(color(), selection_color(), 0.5f); } else background = color(); foreground = fl_contrast(styleRec->color, background); - } else if ( style & (HIGHLIGHT_MASK | PRIMARY_MASK) && Fl::focus() == this ) { - background = selection_color(); + } else if (style & (HIGHLIGHT_MASK | PRIMARY_MASK)) { + if (Fl::focus() == this) background = selection_color(); + else background = fl_color_average(color(), selection_color(), 0.5f); foreground = fl_contrast(textcolor(), background); } else { foreground = textcolor(); @@ -3061,5 +3066,5 @@ int Fl_Text_Display::handle(int event) { // -// End of "$Id: Fl_Text_Display.cxx,v 1.12.2.49 2004/03/01 02:05:02 easysw Exp $". +// End of "$Id: Fl_Text_Display.cxx,v 1.12.2.50 2004/04/06 17:38:36 easysw Exp $". // |
