From 879020baf11d142a48ba1714fcca1c419b93a4c3 Mon Sep 17 00:00:00 2001 From: John Scipione Date: Wed, 8 May 2013 14:05:55 -0400 Subject: [PATCH] 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. --- src/kits/tracker/InfoWindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kits/tracker/InfoWindow.cpp b/src/kits/tracker/InfoWindow.cpp index f07c50342a..9b09b0b369 100644 --- a/src/kits/tracker/InfoWindow.cpp +++ b/src/kits/tracker/InfoWindow.cpp @@ -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);