Find: set a max width on each of the menu fields
... instead of the just on the mime type menu now that menu field truncation is working. This will prevent the volume menu growing too wide as well.
This commit is contained in:
parent
c333966291
commit
13cec30211
@ -862,9 +862,7 @@ FindPanel::FindPanel(BFile* node, FindWindow* parent, bool fromTemplate,
|
||||
else
|
||||
AddByAttributeItems(node);
|
||||
|
||||
fMimeTypeField->SetExplicitSize(
|
||||
BSize(be_control_look->DefaultItemSpacing() * 20, B_SIZE_UNSET));
|
||||
// ResizeMenuField() makes fMimeTypeField too wide.
|
||||
ResizeMenuField(fMimeTypeField);
|
||||
ResizeMenuField(searchModeField);
|
||||
ResizeMenuField(volumeField);
|
||||
}
|
||||
@ -972,7 +970,8 @@ FindPanel::ResizeMenuField(BMenuField* menuField)
|
||||
}
|
||||
}
|
||||
|
||||
size.width = width + padding;
|
||||
float maxWidth = be_control_look->DefaultItemSpacing() * 20;
|
||||
size.width = std::min(width + padding, maxWidth);
|
||||
menuField->SetExplicitSize(size);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user