Opened 16 years ago
Closed 11 years ago
#2413 closed bug (fixed)
[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: | Blocking: | #3051, #5023, #9796 | |
Platform: | All |
Description
- Open /boot/beos/system/add-ons/Translators/TIFFTranslator.
- Set "Use compression" option to anything else from default.
- Notice menu width enlarging.
Attachments (1)
Change History (14)
comment:1 by , 16 years ago
comment:3 by , 16 years ago
Summary: | [Interface kit] enlarging menus → [Interface kit] enlarging menus (easy) |
---|
comment:4 by , 16 years ago
Cc: | 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 by , 16 years ago
Summary: | [Interface kit] enlarging menus (easy) → [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.
comment:8 by , 15 years ago
Version: | R1/pre-alpha1 → R1/Development |
---|
comment:9 by , 15 years ago
In hrev35914, this still happens in Data Translations -> SGI images, and for the menu field at the top of the Backgrounds preflet.
comment:10 by , 14 years ago
comment:13 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed in hrev45725 specifically 6da3c1c
For some reason, calling BMenuField::ResizeToPreferred() (it's called every time the user changes selection) does this. Needs some investigation.