fix bug #10071, part 6:

max menu width was not considering the preview pane widths
This commit is contained in:
Patrick Parker 2007-10-06 03:10:46 +00:00
parent 21591983d1
commit 2fe5dda986

View File

@ -472,8 +472,8 @@ dialog::dimension_measurements dialog::layout(int xloc, int yloc)
// Prevent the menu to be larger than the screen
dim.menu_width = menu_->width();
if(dim.menu_width + image_width + padding_width > size_t(scr->w))
dim.menu_width = scr->w - image_width - padding_width;
if(dim.menu_width + image_width + padding_width + left_preview_pane_width + right_preview_pane_width > static_cast<size_t>(scr->w))
dim.menu_width = scr->w - image_width - padding_width - left_preview_pane_width - right_preview_pane_width;
if(dim.menu_width > text_width)
text_width = dim.menu_width;