'From etoys2.1 of 26 July 2007 [latest update: #1590] on 4 September 2007 at 10:50:01 pm'! "Change Set: tabsClearSugarBar-sw Date: 4 September 2007 Author: Scott Wallace In lining up flap-tabs along the left edge of the screen, start *below* the sugar-nav-bar if the sugarNavigator preference is on."! !StandardScriptingSystem methodsFor: 'help in a flap' stamp: 'sw 9/4/2007 22:11'! cleanUpFlapTabsOnLeft "Make sure the flap tabs on the left of the screen line up nicely, making best use of realestate." | tabsOnLeft current | tabsOnLeft := ((ActiveWorld localFlapTabs, ActiveWorld extantGlobalFlapTabs) select: [:f | f edgeToAdhereTo = #left]) asSortedCollection: [:a :b | a top <= b top]. current := Preferences sugarNavigator ifTrue: [75] ifFalse: [0]. tabsOnLeft do: [:aTab | aTab top: (current min: (ActiveWorld height - aTab height)). current := aTab bottom + 2]. " ScriptingSystem cleanUpFlapTabsOnLeft "! ! !SugarNavigatorBar methodsFor: 'help flap' stamp: 'sw 9/4/2007 22:13'! buildAndOpenHelpFlap "Called only when flaps are being created afresh." | aFlapTab outer leftStrip rightStrip aGuide | aFlapTab := FlapTab new. aFlapTab assureExtension visible: false. outer := AlignmentMorph newRow. outer assureExtension visible: false. outer clipSubmorphs: true. outer beTransparent. outer vResizing: #spaceFill; hResizing: #spaceFill. outer layoutInset: 0; cellInset: 0; borderWidth: 0. outer setProperty: #morphicLayerNumber toValue: 26. leftStrip := Morph new beTransparent. "This provides space for tabs to be seen." leftStrip layoutInset: 0; cellInset: 0; borderWidth: 0. leftStrip width: 20. leftStrip hResizing: #rigid; vResizing: #spaceFill. outer addMorphBack: leftStrip. rightStrip := AlignmentMorph newColumn. rightStrip color: (Color green veryMuchLighter alpha: 0.2). rightStrip layoutInset: 0; cellInset: 0; borderWidth: 0. outer addMorphBack: rightStrip. outer clipSubmorphs: true. aGuide := QuickGuideMorph new. aGuide openInWorld. aGuide order: QuickGuideMorph defaultOrder. rightStrip addMorphBack: aGuide. aGuide beSticky. aFlapTab referent ifNotNil: [aFlapTab referent delete]. aFlapTab referent: outer. aFlapTab setName: 'Help' translated edge: #left color: (Color r: 0.677 g: 0.935 b: 0.484). ActiveWorld addMorphFront: aFlapTab. aFlapTab adaptToWorld: ActiveWorld. aFlapTab computeEdgeFraction. aFlapTab position: (outer left @ outer top). outer extent: (462 @ ActiveWorld height). outer beFlap: true. outer beTransparent. aFlapTab referent hide. aFlapTab openFully. outer beSticky. leftStrip beSticky. rightStrip beSticky. aFlapTab applyThickness: 462. aFlapTab fitOnScreen. aFlapTab referent show. aFlapTab show. Flaps addGlobalFlap: aFlapTab. ActiveWorld addGlobalFlaps. ScriptingSystem cleanUpFlapTabsOnLeft! !