(svn r25864) -Fix: Use the actual sprite dimensions for sizing the dropdown arrow of dropdown widgets.
This commit is contained in:
@@ -393,11 +393,10 @@ struct GameOptionsWindow : Window {
|
||||
if (list != NULL) {
|
||||
/* Find the biggest item for the default size. */
|
||||
for (DropDownList::iterator it = list->begin(); it != list->end(); it++) {
|
||||
static const Dimension extra = {WD_DROPDOWNTEXT_LEFT + WD_DROPDOWNTEXT_RIGHT, WD_DROPDOWNTEXT_TOP + WD_DROPDOWNTEXT_BOTTOM};
|
||||
Dimension string_dim;
|
||||
int width = (*it)->Width();
|
||||
string_dim.width = width + extra.width;
|
||||
string_dim.height = (*it)->Height(width) + extra.height;
|
||||
string_dim.width = width + padding.width;
|
||||
string_dim.height = (*it)->Height(width) + padding.height;
|
||||
*size = maxdim(*size, string_dim);
|
||||
delete *it;
|
||||
}
|
||||
|
Reference in New Issue
Block a user