The Trunk: MorphicExtras-ul.165.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: MorphicExtras-ul.165.mcz

commits-2
Levente Uzonyi uploaded a new version of MorphicExtras to project The Trunk:
http://source.squeak.org/trunk/MorphicExtras-ul.165.mcz

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

Name: MorphicExtras-ul.165
Author: ul
Time: 14 August 2015, 7:01:59.85 pm
UUID: cbb0e98c-88bf-446c-8478-8b2e8ed7c451
Ancestors: MorphicExtras-cmm.164

#includesSubString: -> #includesSubstring:

=============== Diff against MorphicExtras-cmm.164 ===============

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@5.
 
  row := AlignmentMorph newRow.
  row color: c; borderWidth: 0; layoutInset: 0.
  row hResizing: #spaceFill; vResizing: #shrinkWrap; extent: 5@5.
  controlSpecs do: [:spec | | lastGuy b |
  spec == #spacer
  ifTrue:
  [row addTransparentSpacerOfSize: (10 @ 0)]
  ifFalse:
  [spec == #variableSpacer
  ifTrue:
  [row addMorphBack: AlignmentMorph newVariableTransparentSpacer]
  ifFalse:
  [b := SimpleButtonMorph new target: self; borderWidth: 1;
  borderColor: Color veryLightGray; color: c.
  b label: spec first;
  actionSelector: spec second;
  borderWidth: 0;
  setBalloonText: spec third.
  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!