Ticket #2413 (new bug)
[Interface kit] enlarging menus
| Reported by: | diver | Owned by: | axeld |
|---|---|---|---|
| Priority: | normal | Milestone: | R1 |
| Component: | Kits/Interface Kit | Version: | R1/Development |
| Keywords: | Cc: | chillyCreator@… | |
| Blocked By: | Has a Patch: | no | |
| Platform: | All | Blocking: | #3051, #5023 |
Description
- Open /boot/beos/system/add-ons/Translators/TIFFTranslator.
- Set "Use compression" option to anything else from default.
- Notice menu width enlarging.
Attachments
Change History
comment:3 Changed 21 months ago by diver
- Summary changed from [Interface kit] enlarging menus to [Interface kit] enlarging menus (easy)
comment:4 Changed 16 months ago by chico
- Cc chillyCreator@… added
Ticket #2413 is enlarging MenuField. There are two solution to fix this bug. One is set :
fCompressionMF = new BMenuField(BRect(20, 50, 215, 70), "compression", "Use Compression:", menu, true,B_FOLLOW_LEFT_RIGHT); // fCompressionMF->ResizeToPreferred();
the menufield is always to the View's right. The diff is in the attachment.
Another solution is: the menufield side is not to the view's right, and its width is equal to the characters.
fCompressionMF = new BMenuField(BRect(20, 50, 215, 70), "compression",
"Use Compression:", menu,
false);
So which solution should we choose? And I don't know I fixed the bug or not. I also found the menufield of sgi translator is the same.
comment:5 Changed 16 months ago by stippi
- Summary changed from [Interface kit] enlarging menus (easy) to [Interface kit] enlarging menus
Both of these solutions just fix a symptom of a bug in the class framework of BMenu <-> BMenuBar <-> _BMCPrivate_ (the BMenuBar subclass used in the BMenuField control). If the BMenu has a certain resizing mode (B_FOLLOW_LEFT_RIGHT), then the minimum size calculation is buggy. The size calculation is different for some (BeOS-) backwards compatibility reasons, but either BMenuField should not use it at all (always layout it's BMenuBar in FrameResized()) or the calculation is simply buggy and can be fixed. In any case, this bug should not have been marked "easy", since it requires a good overview of the involved classes as well as some knowledge how to approach the backwards-compatibility requirement and test it correctly across a number of apps. Sorry.


For some reason, calling BMenuField::ResizeToPreferred() (it's called every time the user changes selection) does this. Needs some investigation.