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)

Ticket2413.diff (727 bytes ) - added by chico 16 years ago.
enlarge the menu

Download all attachments as: .zip

Change History (14)

comment:1 by jackburton, 16 years ago

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

comment:2 by jackburton, 16 years ago

Blocking: 3051 added

(In #3051) I'm sure this is a dup of #2413.

comment:3 by diver, 16 years ago

Summary: [Interface kit] enlarging menus[Interface kit] enlarging menus (easy)

by chico, 16 years ago

Attachment: Ticket2413.diff added

enlarge the menu

comment:4 by chico, 16 years ago

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 by stippi, 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:6 by jackburton, 15 years ago

Blocking: 5023 added

(In #5023) dup of #2413

comment:7 by diver, 15 years ago

Still here in hrev35569.

comment:8 by diver, 15 years ago

Version: R1/pre-alpha1R1/Development

comment:9 by tbe, 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 diver, 14 years ago

Can't reproduce it using TIFFTranslator, but I still can using Backgrounds preflet from #5023 in hrev38300.

comment:11 by diver, 12 years ago

Still here in hrev44512.

comment:12 by jscipione, 11 years ago

Blocking: 9796 added

(In #9796) Quasi-duplicate of #2413

comment:13 by jscipione, 11 years ago

Resolution: fixed
Status: newclosed

Fixed in hrev45725 specifically 6da3c1c

Note: See TracTickets for help on using tickets.