changeset 1993:26d85eeb723a

downloads GUI: fixed a couple of rendering glitches Removing entries wasn't updating the screen. Workaround for a FLTK-1.3 bug with FL_ROUND_UP_BOX.
author Jorge Arellano Cid <jcid@dillo.org>
date Sat, 30 Apr 2011 16:06:08 -0300
parents 75b1b909ffbc
children 3a714ff1fa37
files dpi/downloads.cc
diffstat 1 files changed, 5 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/dpi/downloads.cc	Fri Apr 29 19:27:04 2011 -0300
+++ b/dpi/downloads.cc	Sat Apr 30 16:06:08 2011 -0300
@@ -67,7 +67,6 @@
 
 // ProgressBar widget --------------------------------------------------------
 
-// class FL_API ProgressBar : public Fl_Widget {
 class ProgressBar : public Fl_Box {
 protected:
    double mMin;
@@ -225,7 +224,7 @@
    mMax = 100;
    mShowPct = true;
    mShowMsg = false;
-   box(FL_DOWN_BOX);
+   box(FL_THIN_UP_BOX);
    color(FL_WHITE);
 }
 
@@ -352,7 +351,6 @@
 
     prBar = new ProgressBar(24, 40, 92, 20);
     prBar->box(FL_THIN_UP_BOX);
-    prBar->color(FL_WHITE);
     prBar->tooltip("Progress Status");
 
     int ix = 122, iy = 36, iw = 50, ih = 14;
@@ -419,7 +417,8 @@
     prButton->clear_visible_focus();
     prButton->callback(prButton_scb, this);
 
-   group->box(FL_ROUND_UP_BOX);
+   //group->box(FL_ROUND_UP_BOX);  --BUG in FLTK-1.3
+   group->box(FL_ROUNDED_BOX);
    group->end();
 }
 
@@ -1029,6 +1028,7 @@
 
    // Remove the widget from the packed group
    mPG->remove(dl_item->get_widget());
+   mScroll->redraw();
    mDList->del(n_item);
    delete(dl_item);
 }
@@ -1084,9 +1084,8 @@
    mWin->begin();
     mScroll = new Fl_Scroll(0,0,ww,wh);
     mScroll->begin();
-     mPG = new Fl_Pack(0,0,ww,wh);
+     mPG = new Fl_Pack(0,0,ww-18,wh);
      mPG->end();
-     //mPG->spacing(10);
     mScroll->end();
     mScroll->type(Fl_Scroll::VERTICAL);
    mWin->end();