Browse Source

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
pull/168/head
Matthias Melcher 20 years ago
parent
commit
3e1666448d
  1. 19
      src/Fl_Browser_.cxx

19
src/Fl_Browser_.cxx

@ -282,18 +282,17 @@ void Fl_Browser_::display(void* p) {
void Fl_Browser_::draw() { void Fl_Browser_::draw() {
int drawsquare = 0; 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(); update_top();
int full_width_ = full_width(); int full_width_ = full_width();
int full_height_ = full_height(); int full_height_ = full_height();
int X, Y, W, H; bbox(X, Y, W, H); int X, Y, W, H; bbox(X, Y, W, H);
int dont_repeat = 0; int dont_repeat = 0;
J1: 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: // see if scrollbar needs to be switched on/off:
if ((has_scrollbar_ & VERTICAL) && ( if ((has_scrollbar_ & VERTICAL) && (
(has_scrollbar_ & ALWAYS_ON) || position_ || full_height_ > H)) { (has_scrollbar_ & ALWAYS_ON) || position_ || full_height_ > H)) {
@ -389,15 +388,15 @@ J1:
full_width_ = full_width(); full_width_ = full_width();
if ((has_scrollbar_ & VERTICAL) && if ((has_scrollbar_ & VERTICAL) &&
((has_scrollbar_ & ALWAYS_ON) || position_ || full_height_>H)) { ((has_scrollbar_ & ALWAYS_ON) || position_ || full_height_>H)) {
if (!scrollbar.visible()) goto J1; if (!scrollbar.visible()) { damage(FL_DAMAGE_ALL); goto J1; }
} else { } else {
if (scrollbar.visible()) goto J1; if (scrollbar.visible()) { damage(FL_DAMAGE_ALL); goto J1; }
} }
if ((has_scrollbar_ & HORIZONTAL) && if ((has_scrollbar_ & HORIZONTAL) &&
((has_scrollbar_ & ALWAYS_ON) || hposition_ || full_width_>W)) { ((has_scrollbar_ & ALWAYS_ON) || hposition_ || full_width_>W)) {
if (!hscrollbar.visible()) goto J1; if (!hscrollbar.visible()) { damage(FL_DAMAGE_ALL); goto J1; }
} else { } else {
if (hscrollbar.visible()) goto J1; if (hscrollbar.visible()) { damage(FL_DAMAGE_ALL); goto J1; }
} }
} }

Loading…
Cancel
Save