Ticket #2413 (new bug)

Opened 2 years ago

Last modified 4 months ago

[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

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

Change History

comment:1 Changed 23 months ago by jackburton

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

comment:2 Changed 21 months ago by jackburton

  • Blocking 3051 added

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

comment:3 Changed 21 months ago by diver

  • Summary changed from [Interface kit] enlarging menus to [Interface kit] enlarging menus (easy)

Changed 16 months ago by chico

enlarge the menu

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.

comment:6 Changed 8 months ago by jackburton

  • Blocking 5023 added

(In #5023) dup of #2413

comment:7 Changed 5 months ago by diver

Still here in r35569.

comment:8 Changed 5 months ago by diver

  • Version changed from R1/pre-alpha1 to R1/Development

comment:9 Changed 4 months ago by tbe

In r35914, this still happens in Data Translations -> SGI images, and for the menu field at the top of the Backgrounds preflet.

Note: See TracTickets for help on using tickets.