Opened 11 years ago

Closed 6 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
Has a Patch: no 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 10 years ago.
enlarge the menu

Download all attachments as: .zip

Change History (14)

comment:1 Changed 11 years 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 11 years ago by jackburton

Blocking: 3051 added

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

comment:3 Changed 11 years ago by diver

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

Changed 10 years ago by chico

Attachment: Ticket2413.diff added

enlarge the menu

comment:4 Changed 10 years 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 10 years ago by stippi

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 Changed 9 years ago by jackburton

Blocking: 5023 added

(In #5023) dup of #2413

comment:7 Changed 9 years ago by diver

Still here in hrev35569.

comment:8 Changed 9 years ago by diver

Version: R1/pre-alpha1R1/Development

comment:9 Changed 9 years ago by tbe

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

comment:10 Changed 9 years ago by diver

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

comment:11 Changed 7 years ago by diver

Still here in hrev44512.

comment:12 Changed 6 years ago by jscipione

Blocking: 9796 added

(In #9796) Quasi-duplicate of #2413

comment:13 Changed 6 years ago by jscipione

Resolution: fixed
Status: newclosed

Fixed in hrev45725 specifically 6da3c1c

Note: See TracTickets for help on using tickets.