[squeak-dev] The Trunk: Morphic-mt.1827.mcz
commits at source.squeak.org
commits at source.squeak.org
Tue Dec 21 17:03:54 UTC 2021
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1827.mcz
==================== Summary ====================
Name: Morphic-mt.1827
Author: mt
Time: 21 December 2021, 6:03:49.086727 pm
UUID: 2db241d8-59ef-47ba-add8-825afe84c4a9
Ancestors: Morphic-mt.1826
Fixes visual glitches around text rendering in FontChooserTool and FontImporterTool. The new text style was not communitcated to the view/widget. For now, I added a quick hook via #changed:with:(#update:with:).
=============== Diff against Morphic-mt.1826 ===============
Item was changed:
----- Method: FontChooserTool>>selectedFontIndex: (in category 'font list') -----
selectedFontIndex: anIndex
anIndex = 0 ifTrue: [^self].
selectedFontIndex := anIndex.
self changed: #selectedFontIndex.
self changed: #selectedFontStyleIndex.
self changed: #pointSizeList.
self changed: #pointSizeIndex.
+
+ self changed: #textStyle with: self selectedFontTextStyle.
self changed: #contents.!
Item was changed:
----- Method: FontChooserTool>>selectedFontStyleIndex: (in category 'style list') -----
selectedFontStyleIndex: anIndex
anIndex = 0 ifTrue: [^self].
emphasis := anIndex - 1.
self changed: #selectedFontStyleIndex.
+ self changed: #textStyle with: self selectedFontTextStyle.
self changed: #contents.!
Item was added:
+ ----- Method: FontChooserTool>>selectedFontTextStyle (in category 'font list') -----
+ selectedFontTextStyle
+
+ ^ TextStyle fontArray: {self selectedFont}!
Item was changed:
----- Method: FontChooserTool>>selectedPointSizeIndex: (in category 'point size') -----
selectedPointSizeIndex: anIndex
anIndex = 0 ifTrue: [^self].
pointSize := (self pointSizeList at: anIndex) withBlanksTrimmed asNumber.
self changed: #selectedPointSizeIndex.
self changed: #pointSizeList.
+
+ self changed: #textStyle with: self selectedFontTextStyle.
self changed: #contents.!
Item was changed:
----- Method: FontChooserTool>>selectedTextStyle (in category 'font list') -----
selectedTextStyle
+ ^TextStyle named: (self selectedFontFamily ifNil: [TextStyle default])!
- ^TextStyle named: (self selectedFontFamily ifNil:[^TextStyle default]).!
Item was changed:
----- Method: FontImporterTool>>currentSelection: (in category 'accessing') -----
currentSelection: anObject
anObject = currentSelection ifTrue: [^ self].
currentSelection := anObject.
self changed: #currentSelection.
self changed: #previewText.
+ self changed: #textStyle with: self selectedFontTextStyle.
self changed: #filename.
self changed: #copyright.!
Item was added:
+ ----- Method: FontImporterTool>>selectedFontTextStyle (in category 'font list') -----
+ selectedFontTextStyle
+
+ ^ TextStyle fontArray: {self selectedFont}!
Item was changed:
----- Method: PluggableTextMorph>>update:with: (in category 'updating') -----
update: aSymbol with: arg1
+ aSymbol == #editString
+ ifTrue: [
+ self editString: arg1.
+ self hasUnacceptedEdits: true.
+ ^ self].
- aSymbol == #editString ifTrue:[
- self editString: arg1.
- self hasUnacceptedEdits: true.
- ].
(aSymbol == #inputRequested and: [self getTextSelector == arg1 or: [self setTextSelector == arg1]])
+ ifTrue: [
+ self activeHand newKeyboardFocus: self.
+ ^ self].
- ifTrue: [self activeHand newKeyboardFocus: self].
+ aSymbol == #textStyle
+ ifTrue: [
+ self textMorph setTextStyle: arg1.
+ ^ self].
+
^super update: aSymbol with: arg1!
Item was changed:
----- Method: TextMorph>>beAllFont: (in category 'initialization') -----
beAllFont: aFont
textStyle := TextStyle fontArray: (Array with: aFont).
text ifNotNil: [text addAttribute: (TextFontReference toFont: aFont)].
+ self releaseParagraph.!
- self releaseCachedState; changed!
Item was changed:
----- Method: TextMorph>>font: (in category 'accessing') -----
font: aFont
| newTextStyle |
newTextStyle := aFont textStyle copy ifNil: [ TextStyle fontArray: { aFont } ].
textStyle := newTextStyle.
text addAttribute: (TextFontChange fontNumber: (newTextStyle fontIndexOf: aFont)).
+ self releaseParagraph.
+ !
- paragraph ifNotNil: [paragraph textStyle: newTextStyle]!
Item was changed:
----- Method: TextMorph>>setTextStyle: (in category 'initialization') -----
setTextStyle: aTextStyle
textStyle := aTextStyle.
+ self releaseParagraph.!
- self releaseCachedState; changed!
More information about the Squeak-dev
mailing list
|