'From Squeak3.1alpha of 5 February 2001 [latest update: #4219] on 30 July 2001 at 1:12:48 pm'! "Change Set: BetterMenuCursor Date: 30 July 2001 Author: Dan Ingalls Changes the menu cursor so that it does not lose its bottom when given an opaque white border. Also derives the window-menu icon from this same image for better consistency. "! !Cursor class methodsFor: 'class initialization' stamp: 'di 7/30/2001 10:32'! initMenu MenuCursor _ (Cursor extent: 16@16 fromArray: #( 2r1111111111100000 2r1000000000100000 2r1010011000100000 2r1000000000100000 2r1101001101100000 2r1111111111100000 2r1000000000100000 2r1011001010100000 2r1000000000100000 2r1010110010100000 2r1000000000100000 2r1010010100100000 2r1000000000100000 2r1111111111100000 0) offset: 0@0). ! ! !SystemWindow methodsFor: 'initialization' stamp: 'di 7/30/2001 12:59'! addMenuControl "If I have a label area, add a menu control to it. " | frame | labelArea ifNil: [^ self]. "No menu if no label area" menuBox ifNotNil: [menuBox delete]. menuBox _ IconicButton new borderWidth: 0; labelGraphic: (ScriptingSystem formAtKey: 'TinyMenu'); color: Color transparent; actWhen: #buttonDown; actionSelector: #offerWindowMenu; target: self; setBalloonText: 'window menu'. frame _ LayoutFrame new. frame leftFraction: 0; leftOffset: 17; topFraction: 0; topOffset: 0. menuBox layoutFrame: frame. labelArea addMorph: menuBox! ! "Postscript: Reinitialize the menu cursor, and put a small copy in the Morphic image dictionary." Cursor initMenu. Cursor classPool at: #MenuCursor put: Cursor menu withMask. ScriptingSystem formDictionary at: #TinyMenu put: (ColorForm mappingWhiteToTransparentFrom: (((Cursor menu as: Form) copy: (1@1 extent: 11@10)) borderWidth: 1)). SystemWindow allSubInstancesDo: [:w | w addMenuControl]!