diff options
author | Sebastian Geerken <devnull@localhost> | 2012-12-14 12:24:54 +0100 |
---|---|---|
committer | Sebastian Geerken <devnull@localhost> | 2012-12-14 12:24:54 +0100 |
commit | 431606334a46191ed9d0bf8a823c6c61882046a4 (patch) | |
tree | 12b0b700e3859d854b8167a41fb30f8a90efe830 | |
parent | 79e8371e84bacc7e8cb21d763ad3301c561cbf1f (diff) | |
parent | fb51b13def5271ad643f18de5e7c4cb8d32228f6 (diff) |
Merge.
-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(); |