[squeak-dev] The Trunk: Morphic-mt.1922.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Mar 4 08:47:23 UTC 2022


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

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

Name: Morphic-mt.1922
Author: mt
Time: 4 March 2022, 9:47:18.204012 am
UUID: 6d731344-6f4c-6643-81f0-958843eecd74
Ancestors: Morphic-mt.1921

Complements Morphic-mt.1921. (Note that a checkpoint was added to the update map.)

=============== Diff against Morphic-mt.1921 ===============

Item was changed:
  ----- Method: NewParagraph>>adjustRightX (in category 'private') -----
  adjustRightX
+ 
+ 	self adjustRightXDownTo: 0.!
- 	| shrink |
- 	shrink := container right - maxRightX.
- 	lines do: [:line | line paddingWidth: (line paddingWidth - shrink)].
- 	container := container withRight: maxRightX + self caretWidth.!

Item was changed:
  ----- Method: TextMorph>>compositionRectangle (in category 'private') -----
  compositionRectangle
+ 
+ 	| compRect minW minH |
- 	| compRect |
  	compRect := self innerBounds.
  	margins ifNotNil: [compRect := compRect insetBy: margins].
+ 	minW := self minCompositionWidth.
+ 	minH := self minCompositionHeight.
+ 	compRect width < minW ifTrue: [compRect := compRect withWidth: minW].
+ 	compRect height < minH ifTrue: [compRect := compRect withHeight: minH].
- 	compRect width < 9 ifTrue: [compRect := compRect withWidth: 9].
- 	compRect height < 16 ifTrue: [compRect := compRect withHeight: 16].
  	^ compRect!

Item was changed:
  ----- Method: TextMorph>>createParagraph (in category 'private') -----
  createParagraph
  
  	self setProperty: #CreatingParagraph toValue: true.
  
  	[
  		self setDefaultContentsIfNil.
  
  		"...Code here to recreate the paragraph..."
  		paragraph := (self paragraphClass new textOwner: self owner).
  		paragraph wantsColumnBreaks: successor notNil.
  		paragraph
  			compose: text
  			style: textStyle
  			from: self startingIndex
  			in: self container.
  		wrapFlag ifFalse:
  			["Was given huge container at first... now adjust"
+ 			paragraph adjustRightXDownTo: self minCompositionWidth].
- 			paragraph adjustRightX].
  		paragraph focused: (self currentHand keyboardFocus == self).
  
  		paragraph
  			showCaret: self hasFocus;
  			caretColor: self caretColor;
  			selectionColor: self selectionColor;
  			unfocusedSelectionColor: self unfocusedSelectionColor.
  		
  		self fit.
  	] ensure: [self removeProperty: #CreatingParagraph].
  
  	^ paragraph!

Item was changed:
  ----- Method: TextMorph>>minHeight (in category 'layout') -----
  minHeight
  
  	| result |
- 	textStyle ifNil: [^ TextStyle defaultFont height].
- 
  	result := (paragraph
+ 		ifNil: [self minCompositionHeight]
- 		ifNil: [textStyle lineGrid]
  		ifNotNil: [paragraph lines first lineHeight])
  			+ (self borderWidth*2).
  	margins ifNil: [^ result].
  	
  	^ margins isRectangle
  		ifTrue: [result + margins top + margins bottom]
  		ifFalse: [margins isPoint
  			ifTrue: [result + margins y + margins y]
  			ifFalse: [result + (2*margins)]]!

Item was changed:
  ----- Method: TextMorph>>minWidth (in category 'layout') -----
  minWidth
  
  	| result |
+ 	result := self minCompositionWidth + (self borderWidth*2).
- 	textStyle ifNil: [^ (TextStyle defaultFont widthOf: $x) * 2].
- 
- 	result := (textStyle defaultFont widthOf: $x) * 2 + (self borderWidth*2).
  	margins ifNil: [^ result].
  	
  	^ margins isRectangle
  		ifTrue: [result + margins left + margins right]
  		ifFalse: [margins isPoint
  			ifTrue: [result + margins x + margins x]
  			ifFalse: [result + (2*margins)]]!



More information about the Squeak-dev mailing list