STR #1133: Text was drawn twice when the scrollbar arrangement changed, causing antialiasing making characters appear somewhat "bold". This was fixed by correctly erasing the background again when redrawing the browser.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4729 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Matthias Melcher 2005-12-31 18:26:01 +00:00
parent a5b959a3df
commit 3e1666448d
1 changed files with 9 additions and 10 deletions

View File

@ -282,18 +282,17 @@ void Fl_Browser_::display(void* p) {
void Fl_Browser_::draw() {
int drawsquare = 0;
if (damage() & FL_DAMAGE_ALL) { // redraw the box if full redraw
Fl_Boxtype b = box() ? box() : FL_DOWN_BOX;
draw_box(b, x(), y(), w(), h(), color());
drawsquare = 1;
}
update_top();
int full_width_ = full_width();
int full_height_ = full_height();
int X, Y, W, H; bbox(X, Y, W, H);
int dont_repeat = 0;
J1:
if (damage() & FL_DAMAGE_ALL) { // redraw the box if full redraw
Fl_Boxtype b = box() ? box() : FL_DOWN_BOX;
draw_box(b, x(), y(), w(), h(), color());
drawsquare = 1;
}
// see if scrollbar needs to be switched on/off:
if ((has_scrollbar_ & VERTICAL) && (
(has_scrollbar_ & ALWAYS_ON) || position_ || full_height_ > H)) {
@ -389,15 +388,15 @@ J1:
full_width_ = full_width();
if ((has_scrollbar_ & VERTICAL) &&
((has_scrollbar_ & ALWAYS_ON) || position_ || full_height_>H)) {
if (!scrollbar.visible()) goto J1;
if (!scrollbar.visible()) { damage(FL_DAMAGE_ALL); goto J1; }
} else {
if (scrollbar.visible()) goto J1;
if (scrollbar.visible()) { damage(FL_DAMAGE_ALL); goto J1; }
}
if ((has_scrollbar_ & HORIZONTAL) &&
((has_scrollbar_ & ALWAYS_ON) || hposition_ || full_width_>W)) {
if (!hscrollbar.visible()) goto J1;
if (!hscrollbar.visible()) { damage(FL_DAMAGE_ALL); goto J1; }
} else {
if (hscrollbar.visible()) goto J1;
if (hscrollbar.visible()) { damage(FL_DAMAGE_ALL); goto J1; }
}
}