Eliot Miranda uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-eem.2133.mcz
==================== Summary ====================
Name: Morphic-eem.2133 Author: eem Time: 10 October 2023, 2:53:46.066891 pm UUID: f6cb84a2-0ad3-4165-bfcf-5cf99a9524f6 Ancestors: Morphic-mt.2132
Robustness in TextMorph>>minExtent. In minHeight the paragraph may be nil but the paragraph's lines may also be nil momentarily, even though the paragraph is not. So use minCompositionHeight in both eventualities.
Extract the common expression in the result computation; write minWidth in the same style.
=============== Diff against Morphic-mt.2132 ===============
Item was changed: ----- Method: TextMorph>>minHeight (in category 'layout') ----- minHeight "Answer the minimal height of the receiver to be used in Morphic layout policies. Avoid text composition if there is no paragraph yet to speed up overall layouting and avoid cyclic algorithmic dependencies. The minimal height is basically computed from text-composition metrics and extra decoration such as borders and margins."
| result | + result := ((paragraph ifNotNil: [:para| para lines ifNotNil: [:lines| lines first lineHeight]]) + ifNil: [self minCompositionHeight]) - result := (paragraph - ifNil: [self minCompositionHeight] - ifNotNil: [:para| para lines first lineHeight]) + (self borderWidth*2). + ^margins + ifNil: [result] + ifNotNil: + [:theMargins| + result + (theMargins isRectangle + ifTrue: [theMargins top + theMargins bottom] + ifFalse: [theMargins isPoint + ifTrue: [theMargins y + theMargins y] + ifFalse: [2 * theMargins]])]! - 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 "Answer the minimal width of the receiver to be used in Morphic layout policies. Avoid text composition if there is no paragraph yet to speed up overall layouting and avoid cyclic algorithmic dependencies. The minimal width is basically computed from text-composition metrics and extra decoration such as borders and margins." | result | result := self minCompositionWidth + (self borderWidth*2). + ^margins + ifNil: [result] + ifNotNil: + [:theMargins| + result + (theMargins isRectangle + ifTrue: [theMargins left + theMargins right] + ifFalse: [theMargins isPoint + ifTrue: [theMargins y + theMargins y] + ifFalse: [2 * theMargins]])]! - margins ifNil: [^ result]. - - ^ margins isRectangle - ifTrue: [result + margins left + margins right] - ifFalse: [margins isPoint - ifTrue: [result + margins x + margins x] - ifFalse: [result + (2*margins)]]!
squeak-dev@lists.squeakfoundation.org