[Pkg] The Trunk: MorphicExtras-pre.211.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Oct 2 12:23:44 UTC 2017


Patrick Rein uploaded a new version of MorphicExtras to project The Trunk:
http://source.squeak.org/trunk/MorphicExtras-pre.211.mcz

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

Name: MorphicExtras-pre.211
Author: pre
Time: 2 October 2017, 2:23:27.336394 pm
UUID: 453b45d7-fcb6-d041-aa89-1322b3adbb3b
Ancestors: MorphicExtras-hjh.210

tiny refactoring of a bookmorph method

=============== Diff against MorphicExtras-hjh.210 ===============

Item was changed:
  ----- Method: BookMorph>>insertPageColored: (in category 'insert and delete') -----
  insertPageColored: aColor 
  	"Insert a new page for the receiver, using the given color as its background color"
  
+ 	| pageExtent newPage borderWidth backgroundColor |
+ 	backgroundColor := currentPage isNil 
- 	| sz newPage bw bc |
- 	bc := currentPage isNil 
  				ifTrue: 
+ 					[pageExtent := pageSize.
+ 					borderWidth := 0.
- 					[sz := pageSize.
- 					bw := 0.
  					Color blue muchLighter]
  				ifFalse: 
+ 					[pageExtent := currentPage extent.
+ 					borderWidth := currentPage borderWidth.
- 					[sz := currentPage extent.
- 					bw := currentPage borderWidth.
  					currentPage borderColor].
  	newPagePrototype ifNil: 
  			[newPage := (PasteUpMorph new)
+ 						extent: pageExtent;
- 						extent: sz;
  						color: aColor.
  			newPage
+ 				borderWidth: borderWidth;
+ 				borderColor: backgroundColor]
- 				borderWidth: bw;
- 				borderColor: bc]
  		ifNotNil: [newPage := Cursor wait showWhile: [newPagePrototype veryDeepCopy]].
  	newPage setNameTo: self defaultNameStemForNewPages.
  	newPage vResizeToFit: false.
  	pages isEmpty 
  		ifTrue: [pages add: (currentPage := newPage)]
  		ifFalse: [pages add: newPage after: currentPage].
  	self nextPage!



More information about the Packages mailing list