improve some vertical_padding calculations.

This commit is contained in:
Patrick Parker 2007-06-17 17:57:55 +00:00
parent b75898b680
commit bb8a64f701
2 changed files with 2 additions and 2 deletions

View file

@ -512,7 +512,7 @@ dialog::dimension_measurements dialog::layout(int xloc, int yloc)
int total_height = text_and_image_height + padding_height + menu_->height() +
text_widget_height + check_button_height;
const int max_height = scr->h - get_frame().vertical_padding();
const int max_height = scr->h - yloc - get_frame().vertical_padding();
if(total_height > max_height) {
//try to reign in the menu height a little bit
const int menu_height = menu_->height();

View file

@ -120,7 +120,7 @@ int dialog_frame::vertical_padding() const {
int padding = 0;
if(buttons_ != NULL) {
for(std::vector<button*>::const_iterator b = buttons_->begin(); b != buttons_->end(); ++b) {
padding = maximum<int>((**b).height() + 2*ButtonVPadding, padding);
padding = maximum<int>((**b).height() + ButtonVPadding, padding);
}
}
if(have_border_) {