The Trunk: Morphic-mt.1700.mcz

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

The Trunk: Morphic-mt.1700.mcz

commits-2
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1700.mcz

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

Name: Morphic-mt.1700
Author: mt
Time: 14 October 2020, 1:50:17.463569 pm
UUID: a72563b1-c6ff-f943-8d4d-e25020cbb89c
Ancestors: Morphic-eem.1699

Rename #collectWithIndex: to #withIndexCollect:. See http://forum.world.st/The-Inbox-60Deprecated-ct-80-mcz-td5120706.html

=============== Diff against Morphic-eem.1699 ===============

Item was changed:
  ----- Method: SequenceableCollection>>segmentedSlopes (in category '*Morphic-NewCurves-cubic support') -----
  segmentedSlopes
  "For a collection of floats. Returns the slopes for straight
  segments between vertices."
  "last slope closes the polygon. Always return same size as
  self. "
  ^ self
+ withIndexCollect: [:x :i | (self atWrap: i + 1)
- collectWithIndex: [:x :i | (self atWrap: i + 1)
  - x]!

Item was changed:
  ----- Method: TextEditor>>changeEmphasisOrAlignment (in category 'attributes') -----
  changeEmphasisOrAlignment
  | aList reply  code align menuList startIndex |
  startIndex := self startIndex.
  aList := #(normal bold italic narrow underlined struckOut leftFlush centered rightFlush justified).
  align := paragraph text alignmentAt: startIndex
  ifAbsent: [ paragraph textStyle alignment ].
  code := paragraph text emphasisAt: startIndex.
  menuList := WriteStream on: Array new.
  menuList nextPut: (code isZero ifTrue:['<on>'] ifFalse:['<off>']), 'normal' translated.
  menuList nextPutAll: (#(bold italic underlined struckOut) collect:[:emph|
  (code anyMask: (TextEmphasis perform: emph) emphasisCode)
  ifTrue: [ '<on>', emph asString translated ]
  ifFalse: [ '<off>',emph asString translated ]]).
  ((paragraph text attributesAt: startIndex)
  anySatisfy: [ :attr | attr isKern and: [attr kern < 0 ]])
  ifTrue: [ menuList nextPut:'<on>', 'narrow' translated ]
  ifFalse: [ menuList nextPut:'<off>', 'narrow' translated ].
+ menuList nextPutAll: (#(leftFlush centered rightFlush justified) withIndexCollect: [ :type :i |
- menuList nextPutAll: (#(leftFlush centered rightFlush justified) collectWithIndex: [ :type :i |
  align = (i-1)
  ifTrue: [ '<on>',type asString translated ]
  ifFalse: [ '<off>',type asString translated ]]).
  aList := #(normal bold italic underlined struckOut narrow leftFlush centered rightFlush justified).
  reply := UIManager default chooseFrom: menuList contents values: aList lines: #(1 6).
  reply notNil ifTrue: [
  (#(leftFlush centered rightFlush justified) includes: reply)
  ifTrue: [
  self setAlignment: reply.
  paragraph composeAll.
  self recomputeSelection]
  ifFalse: [
  self setEmphasis: reply.
  paragraph composeAll.
  self recomputeSelection]].
  ^ true!