Christoph Thiede uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-ct.475.mcz
==================== Summary ====================
Name: Tests-ct.475
Author: ct
Time: 20 January 2022, 1:13:31.961265 am
UUID: 434fe65c-7b89-6147-96fc-190bf8f1a93e
Ancestors: Tests-ct.474
Fixes package dependency test: ToolBuilder-Kernel now depends on Graphics (TextStyle defaultFont).
=============== Diff against Tests-ct.474 ===============
Item was changed:
----- Method: PackageDependencyTest>>testToolBuilder (in category 'tests') -----
testToolBuilder
self testPackage: #'ToolBuilder-Kernel' dependsExactlyOn: #(
Collections
Files
+ Graphics
Kernel
System
).!
Christoph Thiede uploaded a new version of Chronology-Core to project The Trunk:
http://source.squeak.org/trunk/Chronology-Core-ct.73.mcz
==================== Summary ====================
Name: Chronology-Core-ct.73
Author: ct
Time: 20 January 2022, 1:11:13.772265 am
UUID: 8b6eee28-27ad-3649-a9cc-f24b64b1020d
Ancestors: Chronology-Core-mt.71
Moves String >> #asTime[Stamp] from Collections to Chronology-Core.
=============== Diff against Chronology-Core-mt.71 ===============
Item was added:
+ ----- Method: String>>asTime (in category '*chronology-core') -----
+ asTime
+ "Many allowed forms, see Time>>readFrom:"
+
+ ^ Time fromString: self.!
Item was added:
+ ----- Method: String>>asTimeStamp (in category '*chronology-core') -----
+ asTimeStamp
+ "Convert from obsolete TimeStamp format"
+
+ ^ TimeStamp fromString: self!
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1851.mcz
==================== Summary ====================
Name: Morphic-mt.1851
Author: mt
Time: 19 January 2022, 9:35:21.522754 pm
UUID: 8baca7c1-ef50-1d4b-937d-739606c9d7db
Ancestors: Morphic-mt.1850
Fixes another awkward regression. There seems to be a layout issue regarding text morphs and line wrapping. It must not be smaller than 9 pixels ... I will look at a better fix later.
Thanks to Christoph (ct) for finding this!
=============== Diff against Morphic-mt.1850 ===============
Item was changed:
----- Method: TextMorph>>minWidth (in category 'layout') -----
minWidth
| result |
+ textStyle ifNil: [^ (TextStyle defaultFont widthOf: $x) * 2].
- textStyle ifNil: [^ (TextStyle defaultFont widthOf: $x)].
+ result := (textStyle defaultFont widthOf: $x) * 2 + (self borderWidth*2).
- result := (textStyle defaultFont widthOf: $x) + (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)]]!
Marcel Taeumel uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-mt.462.mcz
==================== Summary ====================
Name: Graphics-mt.462
Author: mt
Time: 19 January 2022, 5:52:01.397517 pm
UUID: c5dfdf6e-4452-3e49-90f3-dceec6fb5201
Ancestors: Graphics-mt.461
Fixes two very old bugs in composition of text lines:
1. It is now possible to use fonts in a text that are smaller than the text-morph's current text-style's default font. That line height will be correctly smaller than #defaultLineHeight.
2. The text cursor for a trailing CR in a text field will now use the height of the previous line, which makes it look better if the current font is much smaller/bigger than the text-morph's current text-style's default font.
=============== Diff against Graphics-mt.461 ===============
Item was changed:
----- Method: TextComposer>>addNullLineWithIndex:andRectangle: (in category 'private') -----
addNullLineWithIndex: index andRectangle: r
+ "TextEditor has emphasisHere, which encodes the emphasis of future input. We don't have that info here. Therefore we just use the height of the last text line if there is any."
+
-
lines addLast: (
(
TextLine
start: index
stop: index - 1
internalSpaces: 0
paddingWidth: 0
)
rectangle: r;
+ lineHeight: (lines
+ ifEmpty: [defaultLineHeight]
+ ifNotEmpty: [lines last lineHeight])
+ baseline: (lines
+ ifEmpty: [theTextStyle baseline]
+ ifNotEmpty: [lines last baseline])
- lineHeight: defaultLineHeight baseline: theTextStyle baseline
)
!
Item was changed:
----- Method: TextComposer>>composeAllRectangles: (in category 'private') -----
composeAllRectangles: rectangles
| charIndexBeforeLine numberOfLinesBefore reasonForStopping |
+ actualHeight := 0.
- actualHeight := defaultLineHeight.
charIndexBeforeLine := currCharIndex.
numberOfLinesBefore := lines size.
reasonForStopping := self composeEachRectangleIn: rectangles.
currentY := currentY + actualHeight.
currentY > theContainer bottom ifTrue: [
"Oops -- the line is really too high to fit -- back out"
currCharIndex := charIndexBeforeLine.
lines size - numberOfLinesBefore timesRepeat: [lines removeLast].
^self
].
"It's OK -- the line still fits."
maxRightX := maxRightX max: scanner rightX.
1 to: rectangles size - 1 do: [ :i | |lineIndex|
"Adjust heights across rectangles if necessary"
lineIndex:=lines size - rectangles size + i.
(lines size between: 1 and: lineIndex) ifTrue:
[(lines at: lineIndex)
lineHeight: lines last lineHeight
baseline: lines last baseline]
].
isFirstLine := false.
reasonForStopping == #columnBreak ifTrue: [^nil].
currCharIndex > theText size ifTrue: [
^nil "we are finished composing"
].
!
Marcel Taeumel uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/EToys-mt.458.mcz
==================== Summary ====================
Name: EToys-mt.458
Author: mt
Time: 19 January 2022, 3:16:59.734764 pm
UUID: 6dcfff5e-6901-bf4d-bd33-c91cad215ebe
Ancestors: EToys-mt.457
Fixes awkward regression where the system's default text style gets messed up when opening the ObjectsTool once in a fresh image.
=============== Diff against EToys-mt.457 ===============
Item was changed:
----- Method: TextMorph class>>nonwrappingPrototype (in category '*Etoys-Squeakland-scripting') -----
nonwrappingPrototype
"Answer the default-text-object de jour; at this time, it's actually an instance of UserText."
| text style index baseFont textMorph |
text := Text fromString: 'Text' translated.
baseFont := Preferences standardEToysFont.
+ style := (baseFont textStyle ifNil: [TextStyle default]) copy.
- style := baseFont textStyle ifNil: [TextStyle default].
index := style fontIndexOfPointSize: 24.
style defaultFontIndex: index.
text addAttribute: (TextFontChange fontNumber: index).
textMorph := UserText new.
textMorph
contentsWrapped: text;
setTextStyle: style;
margins: 0@0.
"Too ugly dirty hack from boldAuthoringPrototype."
textMorph wrapFlag: false.
textMorph fit.
textMorph usePango ifTrue: [textMorph wrapFlag: true].
^ textMorph
"
TextMorph nonwrappingPrototype openInHand
"!