Tony Garnock-Jones uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-tonyg.438.mcz
==================== Summary ====================
Name: Graphics-tonyg.438
Author: tonyg
Time: 27 August 2020, 7:33:11.682629 pm
UUID: c77170e1-f29b-44f5-bb2d-b1dc78f9e60c
Ancestors: Graphics-pre.437
As the display may need a repaint after pixelsPerInch changes, call Display restore.
=============== Diff against Graphics-pre.437 ===============
Item was changed:
----- Method: TextStyle class>>pixelsPerInch: (in category 'utilities') -----
pixelsPerInch: aNumber
"Set the nominal number of pixels per inch to aNumber."
TextConstants at: #pixelsPerInch put: aNumber asFloat.
+ AbstractFont allSubInstancesDo: [ :font | font pixelsPerInchChanged ].
+ Display restore.!
- AbstractFont allSubInstancesDo: [ :font | font pixelsPerInchChanged ].!
Tony Garnock-Jones uploaded a new version of TrueType to project The Trunk:
http://source.squeak.org/trunk/TrueType-tonyg.54.mcz
==================== Summary ====================
Name: TrueType-tonyg.54
Author: tonyg
Time: 27 August 2020, 7:31:31.535357 pm
UUID: d4f009fe-48ef-40dc-9455-30140dfcbaf6
Ancestors: TrueType-mt.53
In order for pixelsPerInchChanged to properly rerender things, it seems the (previously-unused) functionality of flushCachedValues is required. So this change puts the functionality of flushCachedValues in flushCache, removes flushCachedValues (no callers in the trunk image), and alters pixelsPerInchChanged for TTCFont to call flushCache instead of recreateCache.
=============== Diff against TrueType-mt.53 ===============
Item was changed:
----- Method: TTCFont>>flushCache (in category 'initialize') -----
flushCache
"Flush the cache of this font"
+ cache := foregroundColor := colorToCacheMap := nil.
+
+ "Flush all values computed from ttcDescription and cached for speed"
+ height := ascent := descent := nil.!
- cache := foregroundColor := colorToCacheMap := nil.!
Item was removed:
- ----- Method: TTCFont>>flushCachedValues (in category 'private') -----
- flushCachedValues
- "Flush all values computed from ttcDescription and cached for speed"
- "TTCFont allInstancesDo:[:font| font flushCachedValues]"
- height := ascent := descent := nil.!
Item was changed:
----- Method: TTCFont>>pixelsPerInchChanged (in category 'notifications') -----
pixelsPerInchChanged
"The definition of TextStyle class>>pixelsPerInch has changed. Do whatever is necessary."
+ self flushCache!
- self recreateCache!
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1675.mcz
==================== Summary ====================
Name: Morphic-mt.1675
Author: mt
Time: 26 August 2020, 3:49:04.632388 pm
UUID: ed707aec-b6db-fc49-9e76-56f61780e8a4
Ancestors: Morphic-mt.1674
Refactors #needsClickToFocus to #handlesKeyboardOnlyOnFocus to be useful for all kinds of morphs.
For backwards compatibility, preserves the simple override "handlesKeyboard:evt \ ^true" without breaking this mechanism.
So, this guard is exactly at the same place, where auto-focus is implemented: Morph >> #handleKeystroke:.
Thanks to Christoph (ct)!
=============== Diff against Morphic-mt.1674 ===============
Item was changed:
----- Method: DialogWindow>>createMessage: (in category 'initialization') -----
createMessage: aString
messageMorph := aString asText asMorph.
messageMorph
name: 'Message';
readOnly: true;
setProperty: #indicateKeyboardFocus toValue: #never;
+ handlesKeyboardOnlyOnFocus: true. "If user presses enter while only hovering the text, we want to process the stroke to close the dialog."
- setProperty: #needsClickToFocus toValue: true.
self setMessageParameters.
^ messageMorph!
Item was changed:
----- Method: Morph>>handleKeyDown: (in category 'events-processing') -----
handleKeyDown: anEvent
"System level event handling."
+ anEvent wasHandled ifTrue: [^ self].
+ (self handlesKeyboard: anEvent) ifFalse: [^ self].
+ (anEvent hand keyboardFocus ~~ self
+ and: [self handlesKeyboardOnlyOnFocus])
+ ifTrue: [^ self].
+
- anEvent wasHandled ifTrue:[^self].
- (self handlesKeyboard: anEvent) ifFalse:[^self].
anEvent wasHandled: true.
+ ^ self keyDown: anEvent!
- ^self keyDown: anEvent!
Item was changed:
----- Method: Morph>>handleKeyUp: (in category 'events-processing') -----
handleKeyUp: anEvent
"System level event handling."
+ anEvent wasHandled ifTrue: [^ self].
+ (self handlesKeyboard: anEvent) ifFalse: [^ self].
+ (anEvent hand keyboardFocus ~~ self
+ and: [self handlesKeyboardOnlyOnFocus])
+ ifTrue: [^ self].
+
- anEvent wasHandled ifTrue:[^self].
- (self handlesKeyboard: anEvent) ifFalse:[^self].
anEvent wasHandled: true.
+ ^ self keyUp: anEvent!
- ^self keyUp: anEvent!
Item was changed:
----- Method: Morph>>handleKeystroke: (in category 'events-processing') -----
handleKeystroke: anEvent
"System level event handling. Has support for automatically grabbing the keyboard focus considering the keyboard focus delegate. See #newKeyboardFocus:"
| handler |
anEvent wasHandled ifTrue: [^ self].
(self handlesKeyboard: anEvent) ifFalse: [^ self].
+ (anEvent hand keyboardFocus ~~ self
+ and: [self handlesKeyboardOnlyOnFocus])
+ ifTrue: [^ self].
handler := self wantsKeyboardFocus
ifFalse: [self]
ifTrue: [(anEvent hand newKeyboardFocus: self) ifNil: [self]].
anEvent handler: handler.
anEvent wasHandled: true.
^ handler keyStroke: anEvent!
Item was added:
+ ----- Method: Morph>>handlesKeyboardOnlyOnFocus (in category 'event handling') -----
+ handlesKeyboardOnlyOnFocus
+ "If set, reject every keyboard event until the receiver has received the keyboard focus in another way, i.e. a mouse click (see #mouseDown:) or programmatic focusing (see HandMorph >> #newKeyboardFocus:). This allows sending keyboard events to any owner of the receiver while the receiver is hovered by the hand. See senders.
+ A particular user is DialogWindow which looks for Enter and Escape presses and should not loose these events to the content morph unless it is explicitly focused. For the full discussion, see http://forum.world.st/The-Inbox-Morphic-cbc-1665-mcz-td5117905.html."
+
+ ^ self valueOfProperty: #handlesKeyboardOnlyOnFocus ifAbsent: [false]!
Item was added:
+ ----- Method: Morph>>handlesKeyboardOnlyOnFocus: (in category 'event handling') -----
+ handlesKeyboardOnlyOnFocus: aBoolean
+
+ ^ self setProperty: #handlesKeyboardOnlyOnFocus toValue: aBoolean!
Item was changed:
----- Method: PluggableTextMorph>>mouseEnter: (in category 'event handling') -----
mouseEnter: event
"Restore the selection in the text morph if there was a selection."
super mouseEnter: event.
selectionInterval ifNotNil: [:interval |
textMorph editor
selectInterval: selectionInterval;
setEmphasisHere].
Preferences mouseOverForKeyboardFocus
+ ifTrue: [event hand newKeyboardFocus: self].!
- ifTrue:[event hand newKeyboardFocus: self]!
Item was changed:
----- Method: TextMorph>>handleKeystroke: (in category 'events-processing') -----
handleKeystroke: anEvent
"Overwritten to support tab-among-fields preference."
| pasteUp |
anEvent wasHandled ifTrue:[^self].
(self handlesKeyboard: anEvent) ifFalse: [^ self].
+ (anEvent hand keyboardFocus ~~ self
+ and: [self handlesKeyboardOnlyOnFocus])
+ ifTrue: [^ self].
anEvent keyCharacter = Character tab ifTrue: [
"Allow passing through text morph inside pasteups"
(self wouldAcceptKeyboardFocusUponTab
and: [(pasteUp := self pasteUpMorphHandlingTabAmongFields) notNil])
ifTrue: [
anEvent wasHandled: true.
^ pasteUp tabHitWithEvent: anEvent]].
^ super handleKeystroke: anEvent!
Item was changed:
----- Method: TextMorph>>handlesKeyboard: (in category 'event handling') -----
+ handlesKeyboard: evt
+ ^true!
- handlesKeyboard: anEvent
-
- ^ ((self valueOfProperty: #needsClickToFocus ifAbsent: [false]) ==> [
- anEvent hand keyboardFocus = self])!
Eliot Miranda uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-ct.985.mcz
==================== Summary ====================
Name: Tools-ct.985
Author: ct
Time: 22 August 2020, 8:05:25.644378 pm
UUID: fcb716be-e917-2646-ade9-4c4550088392
Ancestors: Tools-eem.984
Fix selection updates in ChangeList by sending missing observer updates.
Same reason as ToolBuilder-Morphic-ct.253. I also re-checked all other senders of #setSelectionList: in the Trunk image and did not found any further invalidation problems.
=============== Diff against Tools-eem.984 ===============
Item was changed:
----- Method: ChangeList>>listSelectionAt:put: (in category 'viewing access') -----
listSelectionAt: index put: value
listSelections at: index put: value.
+ self
+ changed: #listSelectionAt:;
+ changed: #listIndex.
- self changed: #listIndex.
^ value!
Eliot Miranda uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-ct.1338.mcz
==================== Summary ====================
Name: Kernel-ct.1338
Author: ct
Time: 22 August 2020, 8:18:22.970378 pm
UUID: 2ab1921f-016a-7044-9b35-75f940130863
Ancestors: Kernel-dtl.1336
Break dependents when copying a model
For the full discussion, see this thread: http://forum.world.st/Bug-in-copy-td5120761.html
=============== Diff against Kernel-dtl.1336 ===============
Item was added:
+ ----- Method: Model>>postCopy (in category 'copying') -----
+ postCopy
+
+ super postCopy.
+ self breakDependents.!