'From Squeak3.7beta of ''1 April 2004'' [latest update: #5878] on 14 April 2004 at 4:36:36 pm'! "Change Set: MenuItemWidthFix-nk Date: 14 April 2004 Author: Ned Konz MenuItemMorphs with markers weren't getting laid out correctly. This is a fix for that problem. To see the problem, try this (from Stˇphane Rollandin): | m | m _ MenuMorph new. m add: ' some action' action: #yourself. m add: ' some other action' action: #yourself. m add: 'too short !!' action: #yourself. m popUpInWorld "! !MenuItemMorph methodsFor: 'layout' stamp: 'nk 4/14/2004 14:57'! minWidth | fontToUse iconWidth subMenuWidth markerWidth | fontToUse := self fontToUse. subMenuWidth := self hasSubMenu ifFalse: [0] ifTrue: [10]. iconWidth := self hasIcon ifTrue: [self icon width + 2] ifFalse: [0]. markerWidth := self hasMarker ifTrue: [ self submorphBounds width + 8 ] ifFalse: [ 0 ]. ^ (fontToUse widthOfString: contents) + subMenuWidth + iconWidth + markerWidth.! !