diff options
-rw-r--r-- | dpi/downloads.cc | 8 | ||||
-rw-r--r-- | src/uicmd.cc | 12 |
2 files changed, 15 insertions, 5 deletions
diff --git a/dpi/downloads.cc b/dpi/downloads.cc index c794ef2f..8e560d35 100644 --- a/dpi/downloads.cc +++ b/dpi/downloads.cc @@ -1098,13 +1098,17 @@ class DlScroll : public Fl_Scroll public: void resize(int x_, int y_, int w_, int h_) { + 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()); - Fl_Scroll::resize(x_, y_, w_, h_); } DlScroll(int x, int y, int w, int h, const char *l = 0) : Fl_Scroll(x, y, w, h, l) diff --git a/src/uicmd.cc b/src/uicmd.cc index 20d32519..de90748f 100644 --- a/src/uicmd.cc +++ b/src/uicmd.cc @@ -289,9 +289,15 @@ UI *CustTabs::add_new_tab(UI *old_ui, int focus) if (focus) { switch_tab(btn); - } else if (num_tabs() == 2) { - // no focus and tabbar added: redraw current page - Wizard->redraw(); + } else { // no focus + // set focus counter + increase_focus_counter(); + btn->focus_num(focus_counter); + + if (num_tabs() == 2) { + // tabbar added: redraw current page + Wizard->redraw(); + } } if (num_tabs() == 1) btn->hide(); |