The scrollbar now is also deactivate when nothing to scroll.

set_size() also should call set_scrollbar_button_status(), which is now done.
This commit is contained in:
Mark de Wever 2008-05-18 07:18:06 +00:00
parent 3495b3551b
commit d86efb4a34

View File

@ -235,6 +235,9 @@ void tlistbox::set_scrollbar_button_status()
button->set_active(!scrollbar()->at_end());
}
}
// Set the scrollbar itself
scrollbar()->set_active(!(scrollbar()->at_begin() && scrollbar()->at_end()));
}
/**
@ -375,6 +378,7 @@ void tlistbox::set_size(const SDL_Rect& rect)
} else {
scrollbar()->set_visible_items(1);
}
set_scrollbar_button_status();
}
twidget* tlistbox::find_widget(const tpoint& coordinate, const bool must_be_active)