mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-01 02:15:37 +00:00
fix bug #10071, part 6:
max menu width was not considering the preview pane widths
This commit is contained in:
parent
21591983d1
commit
2fe5dda986
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user