mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-12 01:01:11 +00:00
prevent the menu from being skinny in dialogs
This commit is contained in:
parent
6d2510f95c
commit
d8a55946b5
@ -532,6 +532,11 @@ int show_dialog(display& disp, surface image,
|
|||||||
|
|
||||||
if(text_widget_width+left_padding+right_padding > total_width)
|
if(text_widget_width+left_padding+right_padding > total_width)
|
||||||
total_width = text_widget_width+left_padding+right_padding;
|
total_width = text_widget_width+left_padding+right_padding;
|
||||||
|
//Prevent the menu from being too skinny
|
||||||
|
if(menu_.width() > 0 && preview_panes == NULL &&
|
||||||
|
total_width > menu_.width() + image_width + padding_width) {
|
||||||
|
menu_.set_width(total_width - image_width - padding_width);
|
||||||
|
}
|
||||||
|
|
||||||
const size_t text_and_image_height = image_height > total_text_height ? image_height : total_text_height;
|
const size_t text_and_image_height = image_height > total_text_height ? image_height : total_text_height;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user