In the dialog layout code, fixed the button padding.

There was no check if the "text_and_image_height"
variable was equal to zero. If so, the buttons were
placed -6 units too high.
This commit is contained in:
unknown 2014-08-01 04:58:34 -04:00
parent 3ecdc9d1a5
commit f60ef98e27

View file

@ -626,7 +626,7 @@ dialog::dimension_measurements dialog::layout(int xloc, int yloc)
}
}
const int text_widget_y = dim.y+top_padding+text_and_image_height-6+menu_hpadding;
const int text_widget_y = dim.y + top_padding + text_and_image_height - (text_and_image_height > 0 ? 6 : 0) + menu_hpadding;
if(use_textbox) {
dim.textbox.x = dim.x + left_padding + text_widget_width - dim.textbox.w;