Info: Set fixed size true for pref app menu field
Fixes #9753 This changes the preferred app menu field to no longer resize itself based on the item width and instead always take up the rest of the available space in the window. For narrower items this means that there will be empty space to the right where there wasn't before. For items wider than the available width of the window (like the example in #9753) this means that the item will be truncated when selected. AFAIK this was always a problem and was not caused by my recent work on menu fields, we just didn't notice it because it's rare that an application name in English at the default 12pt font size is wider than the available space. That being said, this fix is a band aid, the real fix is to convert this window to use the layout APIs so that if you have an application that is too wide to fit then the window will resize itself to fit the new item. There are other some layout problems in this window too. Unfortunately, like Find, this window has not been updated in aldeck's Tracker layout branch. Luckily, converting this window to use the layout API is a lot less work than Find was.
This commit is contained in:
parent
ec1f08fb05
commit
879020baf1
@ -921,7 +921,7 @@ AttributeView::AttributeView(BRect rect, Model* model)
|
||||
fTitleRect.bottom + (lineHeight * 7),
|
||||
Bounds().Width() - 5, fTitleRect.bottom + (lineHeight * 8));
|
||||
fPreferredAppMenu = new BMenuField(preferredAppRect, "", "",
|
||||
new BPopUpMenu(""));
|
||||
new BPopUpMenu(""), true);
|
||||
fDivider = currentFont.StringWidth(B_TRANSLATE("Opens with:"))
|
||||
+ 5;
|
||||
fPreferredAppMenu->SetDivider(fDivider);
|
||||
|
Loading…
Reference in New Issue
Block a user