Skip to content

Commit

Permalink
Fix Fl_Text_Display box drawing bug.
Browse files Browse the repository at this point in the history
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2951 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
  • Loading branch information
michaelrsweet committed Mar 17, 2003
1 parent 32c8318 commit 9998160
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
2 changes: 2 additions & 0 deletions CHANGES
@@ -1,5 +1,7 @@
CHANGES IN FLTK 1.1.4

- Fl_Text_Display didn't draw the outer box in the right
dimensions, so it was invisible.
- Fl_Help_Dialog used the same color for links as for
the background, causing links to be invisible on pages
without a background color set.
Expand Down
18 changes: 12 additions & 6 deletions 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
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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 $".
//

0 comments on commit 9998160

Please sign in to comment.