[FIX] Menu flap's tab does not use the right font
Stephen Travis Pope
stp at create.ucsb.edu
Thu Jan 13 21:38:44 UTC 2000
The following fixes the fact that the menu flap's tab uses the menu font instead of the flap font.
!Utilities class methodsFor: 'flaps' stamp: 'stp 01/13/2000 13:13'!
menuFlap
| aFlap aFlapTab aHolder verticalHolder aMenu |
aFlap _ PasteUpMorph newSticky color: Color transparent; extent: self currentWorld width @ 264; borderWidth: 0; padding: 0.
aFlapTab _ FlapTab new referent: aFlap.
aFlapTab color: Color brown lighter.
aFlapTab assumeString: 'Menus' font: Preferences standardFlapFont orientation: #horizontal color: Color blue muchLighter.
aFlapTab setToPopOutOnMouseOver: true.
aFlapTab edgeToAdhereTo: #top; inboard: false.
aFlapTab position: ((Display width - aFlapTab width) // 2) @ 0.
aFlap setProperty: #flap toValue: true.
aFlap color: (Color blue muchLighter alpha: 0.6).
aFlap extent: self currentWorld width @ 267.
aHolder _ AlignmentMorph newRow beSticky beTransparent.
#(openMenu helpMenu windowsMenu (changesMenu debugMenu ) (playfieldMenu scriptingMenu )) do:
[:elem |
(elem isKindOf: Array)
ifTrue:
[verticalHolder _ AlignmentMorph newColumn beSticky beTransparent.
verticalHolder hResizing: #shrinkWrap; inset: 0; centering: #center.
elem do:
[:aMenuSymbol |
verticalHolder addMorphBack: ((aMenu _ self currentHand perform: aMenuSymbol) beSticky; stayUp: true).
aMenu beSticky.
aMenu borderWidth: 1.
aMenu submorphs second delete].
aHolder addMorphBack: verticalHolder]
ifFalse:
[aHolder addMorphBack: ((aMenu _ self currentHand perform: elem) beSticky; stayUp: true).
aMenu submorphs second delete.
aMenu beSticky.
aMenu borderWidth: 1]].
aFlap addMorphBack: aHolder.
^ aFlapTab! !
--
stp
Stephen Travis Pope -- http://www.create.ucsb.edu/~stp
stp at expertcity.com -- stp9 at cornell.edu
More information about the Squeak-dev
mailing list
|