From d8a55946b5a5695470a190aa353bd4d7b34aadfb Mon Sep 17 00:00:00 2001 From: Patrick Parker Date: Sat, 3 Jun 2006 08:14:03 +0000 Subject: [PATCH] prevent the menu from being skinny in dialogs --- src/show_dialog.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/show_dialog.cpp b/src/show_dialog.cpp index 78c33e77b22..1f371a8e13f 100644 --- a/src/show_dialog.cpp +++ b/src/show_dialog.cpp @@ -532,6 +532,11 @@ int show_dialog(display& disp, surface image, if(text_widget_width+left_padding+right_padding > total_width) 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;