Hi list, Here is a patch which provides a dark theme for downloads.dpi. Screenshot is attached. Maybe something like this could be a part of a future 'dark mode' option for Dillo. Feedback welcome! Regards, Alex --- a/dpi/downloads.cc Sun Aug 11 22:21:59 2024 +++ b/dpi/downloads.cc Wed Aug 21 13:13:41 2024 @@ -240,7 +240,7 @@ ProgressBar::ProgressBar(int x, int y, int w, int h, c mShowPct = true; mShowMsg = false; box(FL_THIN_UP_BOX); - color(FL_WHITE); + color(FL_YELLOW); } void ProgressBar::draw() @@ -259,16 +259,16 @@ void ProgressBar::draw() double pct = (mPresent - mMin) / mMax; r.w = r.w * pct + .5; - fl_rectf(r.x, r.y, r.w, r.h, FL_BLUE); + fl_rectf(r.x, r.y, r.w, r.h, FL_WHITE); if (mShowMsg) { - fl_color(FL_RED); + fl_color(FL_BLACK); fl_font(this->labelfont(), this->labelsize()); fl_draw(mMsg, x(), y(), w(), h(), FL_ALIGN_CENTER); } else if (mShowPct) { char buffer[30]; sprintf(buffer, "%d%%", int (pct * 100 + .5)); - fl_color(FL_RED); + fl_color(FL_BLACK); fl_font(this->labelfont(), this->labelsize()); fl_draw(buffer, x(), y(), w(), h(), FL_ALIGN_CENTER); } @@ -345,12 +345,14 @@ DLItem::DLItem(const char *full_filename, const char * WidgetDone = 0; WgetStatus = -1; - gw = 400, gh = 70; + gw = 420, gh = 85; group = new Fl_Group(0,0,gw,gh); group->begin(); + group->color(FL_BLACK); prTitle = new Fl_Box(24, 7, 290, 23); prTitle->box(FL_RSHADOW_BOX); - prTitle->color(FL_WHITE); + prTitle->color(FL_BLACK); + prTitle->labelcolor(FL_WHITE); prTitle->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE|FL_ALIGN_CLIP); prTitle->copy_label(shortname); // Attach this 'log_text' to the tooltip @@ -370,7 +372,7 @@ DLItem::DLItem(const char *full_filename, const char * o->tooltip("Downloaded Size"); prGot = new Fl_Box(ix,iy+14,iw,ih, "0KB"); prGot->align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE); - prGot->labelcolor(FL_BLUE); + prGot->labelcolor(FL_YELLOW); prGot->labelsize(12); prGot->box(FL_NO_BOX); @@ -382,6 +384,7 @@ DLItem::DLItem(const char *full_filename, const char * o->tooltip("Total Size"); prSize = new Fl_Box(ix,iy+14,iw,ih, "??"); prSize->align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE); + prSize->labelcolor(FL_DARK2); prSize->labelsize(12); prSize->box(FL_NO_BOX); @@ -393,6 +396,7 @@ DLItem::DLItem(const char *full_filename, const char * o->tooltip("Current transfer Rate (KBytes/sec)"); prRate = new Fl_Box(ix,iy+14,iw,ih, "??"); prRate->align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE); + prRate->labelcolor(FL_DARK2); prRate->labelsize(12); prRate->box(FL_NO_BOX); @@ -404,6 +408,7 @@ DLItem::DLItem(const char *full_filename, const char * o->tooltip("Average transfer Rate (KBytes/sec)"); pr_Rate = new Fl_Box(ix,iy+14,iw,ih, "??"); pr_Rate->align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE); + pr_Rate->labelcolor(FL_DARK2); pr_Rate->labelsize(12); pr_Rate->box(FL_NO_BOX); @@ -415,16 +420,19 @@ DLItem::DLItem(const char *full_filename, const char * o->tooltip("Estimated Time of Arrival"); prETA = new Fl_Box(ix,iy+14,iw,ih, "??"); prETA->align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE); + prETA->labelcolor(FL_DARK2); prETA->labelsize(12); prETA->box(FL_NO_BOX); prButton = new Fl_Button(326, 9, 44, 19, "Stop"); prButton->tooltip("Stop this transfer"); prButton->box(FL_UP_BOX); + prButton->color(FL_DARK2); + prButton->labelcolor(FL_BLACK); prButton->clear_visible_focus(); prButton->callback(prButton_scb, this); - group->box(FL_ROUNDED_BOX); + group->box(FL_THIN_UP_BOX); group->end(); } @@ -1056,9 +1064,9 @@ DLWin::DLWin(int ww, int wh) { mScroll->resizable(mPG); mWin->end(); mWin->resizable(mScroll); - mWin->callback(dlwin_esc_cb, NULL); + mWin->callback(dlwin_esc_cb, NULL); mWin->show(); - + // Set SIGCHLD handlers sigemptyset(&mask_sigchld); sigaddset(&mask_sigchld, SIGCHLD);