diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2003-03-17 18:31:16 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2003-03-17 18:31:16 +0000 |
| commit | 99981602d1f6fb0ee83bb61a6247c6300732e741 (patch) | |
| tree | 7e347d0c0d99f59c8aea3536836e63686323327d /src/Fl_Text_Display.cxx | |
| parent | 32c831857a286f46febb02db7193e3951136d44b (diff) | |
Fix Fl_Text_Display box drawing bug.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2951 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Text_Display.cxx')
| -rw-r--r-- | src/Fl_Text_Display.cxx | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/Fl_Text_Display.cxx b/src/Fl_Text_Display.cxx index 338c3bfa2..7c256d0b7 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.42 2003/01/30 21:42:48 easysw Exp $" +// "$Id: Fl_Text_Display.cxx,v 1.12.2.43 2003/03/17 18:31:16 easysw Exp $" // // Copyright 2001-2003 by Bill Spitzak and others. // Original code Copyright Mark Edel. Permission to distribute under @@ -2810,10 +2810,16 @@ void Fl_Text_Display::draw(void) { // draw the non-text, non-scrollbar areas. if (damage() & FL_DAMAGE_ALL) { - //printf("drawing all\n"); +// printf("drawing all (box = %d)\n", box()); // draw the box() - draw_box(box(), text_area.x, text_area.y, text_area.w, text_area.h, - color()); + int W = w(), H = h(); + + if (mHScrollBar->visible()) + W -= scrollbar_width(); + if (mVScrollBar->visible()) + H -= scrollbar_width(); + + draw_box(box(), x(), y(), W, H, color()); // left margin fl_rectf(text_area.x-LEFT_MARGIN, text_area.y-TOP_MARGIN, @@ -2842,7 +2848,7 @@ void Fl_Text_Display::draw(void) { // blank the previous cursor protrusions } else if (damage() & (FL_DAMAGE_SCROLL | FL_DAMAGE_EXPOSE)) { - //printf("blanking previous cursor extrusions at Y: %d\n", mCursorOldY); +// printf("blanking previous cursor extrusions at Y: %d\n", mCursorOldY); // CET - FIXME - save old cursor position instead and just draw side needed? fl_push_clip(text_area.x-LEFT_MARGIN, text_area.y, @@ -3038,5 +3044,5 @@ int Fl_Text_Display::handle(int event) { // -// End of "$Id: Fl_Text_Display.cxx,v 1.12.2.42 2003/01/30 21:42:48 easysw Exp $". +// End of "$Id: Fl_Text_Display.cxx,v 1.12.2.43 2003/03/17 18:31:16 easysw Exp $". // |
