From 6442d8c2cdae9addb0012fe9b79375f459f500bf Mon Sep 17 00:00:00 2001 From: Jeremy Henty Date: Wed, 12 Dec 2012 19:40:33 +0000 Subject: Download DPI Scroll should calculate the scrollbar width properly. --- dpi/downloads.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'dpi') diff --git a/dpi/downloads.cc b/dpi/downloads.cc index 8f1c29f8..8e560d35 100644 --- a/dpi/downloads.cc +++ b/dpi/downloads.cc @@ -1100,10 +1100,14 @@ public: { Fl_Scroll::resize(x_, y_, w_, h_); Fl_Widget *resizable_ = resizable(); + int sb_size = + resizable_->h() <= h() ? 0 : + scrollbar_size() ? scrollbar_size() : + Fl::scrollbar_size(); if (resizable_) resizable_->resize(resizable_->x(), resizable_->y(), - w() - scrollbar_size(), + w() - sb_size, resizable_->h()); } DlScroll(int x, int y, int w, int h, const char *l = 0) -- cgit v1.2.3