[squeak-dev] The Trunk: MorphicExtras-tfel.193.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Aug 30 15:08:12 UTC 2016


Tim Felgentreff uploaded a new version of MorphicExtras to project The Trunk:
http://source.squeak.org/trunk/MorphicExtras-tfel.193.mcz

==================== Summary ====================

Name: MorphicExtras-tfel.193
Author: tfel
Time: 30 August 2016, 5:07:14.81504 pm
UUID: 0ebc958c-31d5-c34b-9216-6612162cac96
Ancestors: MorphicExtras-tfel.192

fix deprecated method

=============== Diff against MorphicExtras-tfel.192 ===============

Item was changed:
  ----- Method: BooklikeMorph>>makePageControlsFrom: (in category 'page controls') -----
  makePageControlsFrom: controlSpecs
  	"From the controlSpecs, create a set of page control and return them -- this method does *not* add the controls to the receiver."
  
  	| c col row |
  	c := (color saturation > 0.1) ifTrue: [color slightlyLighter] ifFalse: [color slightlyDarker].
  	col := AlignmentMorph newColumn.
  	col color: c; borderWidth: 0; layoutInset: 0.
  	col hResizing: #spaceFill; vResizing: #shrinkWrap; extent: 5 at 5.
  
  	row := AlignmentMorph newRow.
  	row color: c; borderWidth: 0; layoutInset: 0.
  	row hResizing: #spaceFill; vResizing: #shrinkWrap; extent: 5 at 5.
  	controlSpecs do: [:spec | | lastGuy b |
  		spec == #showDescription ifTrue: [row addMorphBack: self makeDescriptionViewer].
  		spec == #pageNumber ifTrue: [row addMorphBack: self makePageNumberItem].
  		spec == #spacer ifTrue: [row addTransparentSpacerOfSize: (10 @ 0)].
  		spec == #variableSpacer ifTrue: [
  			row addMorphBack: AlignmentMorph newVariableTransparentSpacer].
  		spec class == Array ifTrue: [
  			spec first isSymbol
  				ifTrue: [b := ThreePhaseButtonMorph labelSymbol: spec first]
  				ifFalse: [b := SimpleButtonMorph new borderWidth: 2; 
  							borderColor: Color black; color: Color veryLightGray.
  							b label: spec first font: Preferences standardMenuFont].
  				b target: self;  actionSelector: spec second;  setBalloonText: spec third.
  				(spec atPin: 4) = #border 
  					ifTrue: [b actWhen: #buttonDown]
  					ifFalse: [b borderWidth: 0].	"default is none"
  				row addMorphBack: b.
+ 				(((lastGuy := spec last asLowercase) includesSubstring: 'menu') or:
+ 						[lastGuy includesSubstring: 'designations'])
- 				(((lastGuy := spec last asLowercase) includesSubString: 'menu') or:
- 						[lastGuy includesSubString: 'designations'])
  					ifTrue: [b actWhen: #buttonDown]]].  "pop up menu on mouseDown"
  		col addMorphBack: row.
  	^ col!



More information about the Squeak-dev mailing list