tim Rowledge uploaded a new version of MultilingualTests to project The Trunk:
http://source.squeak.org/trunk/MultilingualTests-tpr.19.mcz
==================== Summary ====================
Name: MultilingualTests-tpr.19
Author: tpr
Time: 20 January 2016, 5:59:14.555529 pm
UUID: b2182a04-860d-4137-a68e-89b4502e581d
Ancestors: MultilingualTests-fbs.18
Fix a failing test - when formatting NewParagraphs the caretWidth is added to the width required by the actual included text. The test needs to allow for that
=============== Diff against MultilingualTests-fbs.18 ===============
Item was changed:
----- Method: FontTest>>testParagraph (in category 'testing') -----
testParagraph
"self debug: #testParagraph"
| text p style height width |
text := 'test' asText.
p := NewParagraph new.
style := TextStyle default.
p
compose: text
style: style
from: 1
in: (0 @ 0 corner: 100 @ 100).
"See CompositionScanner>>setActualFont: &
CompositionScanner>>composeFrom:inRectangle:firstLine:leftSide:rightSide:"
height := style defaultFont height + style leading.
+ width := (text
- width := text
inject: 0
into: [:tally :next | tally
+ + (style defaultFont widthOf: next)]) + p caretWidth. "because it is added by the paragraph formatting"
- + (style defaultFont widthOf: next)].
p adjustRightX.
self assert: p extent = (width @ height)!
tim Rowledge uploaded a new version of MultilingualTests to project The Trunk:
http://source.squeak.org/trunk/MultilingualTests-tpr.19.mcz
==================== Summary ====================
Name: MultilingualTests-tpr.19
Author: tpr
Time: 20 January 2016, 5:59:14.555529 pm
UUID: b2182a04-860d-4137-a68e-89b4502e581d
Ancestors: MultilingualTests-fbs.18
Fix a failing test - when formatting NewParagraphs the caretWidth is added to the width required by the actual included text. The test needs to allow for that
=============== Diff against MultilingualTests-fbs.18 ===============
Item was changed:
----- Method: FontTest>>testParagraph (in category 'testing') -----
testParagraph
"self debug: #testParagraph"
| text p style height width |
text := 'test' asText.
p := NewParagraph new.
style := TextStyle default.
p
compose: text
style: style
from: 1
in: (0 @ 0 corner: 100 @ 100).
"See CompositionScanner>>setActualFont: &
CompositionScanner>>composeFrom:inRectangle:firstLine:leftSide:rightSide:"
height := style defaultFont height + style leading.
+ width := (text
- width := text
inject: 0
into: [:tally :next | tally
+ + (style defaultFont widthOf: next)]) + p caretWidth. "because it is added by the paragraph formatting"
- + (style defaultFont widthOf: next)].
p adjustRightX.
self assert: p extent = (width @ height)!
tim Rowledge uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-tpr.1069.mcz
==================== Summary ====================
Name: Morphic-tpr.1069
Author: tpr
Time: 19 January 2016, 2:00:10.351434 pm
UUID: 080b7719-2b70-419c-91f3-4842337058a6
Ancestors: Morphic-mt.1068, Morphic-tpr.1068
This seems to be the best way to make sure that the preference 'cmd gestures enabled' being false results in no Halos.
If you have a nicer way, please replace this.
=============== Diff against Morphic-mt.1068 ===============
Item was changed:
----- Method: Morph>>handleMouseDown: (in category 'events-processing') -----
handleMouseDown: anEvent
"System level event handling."
anEvent wasHandled ifTrue:[^self]. "not interested"
anEvent hand removePendingBalloonFor: self.
anEvent hand removePendingHaloFor: self.
anEvent wasHandled: true.
(anEvent controlKeyPressed
and: [anEvent blueButtonChanged not
and: [Preferences cmdGesturesEnabled]])
ifTrue: [^ self invokeMetaMenu: anEvent].
"Make me modal during mouse transitions"
anEvent hand newMouseFocus: self event: anEvent.
+ (anEvent blueButtonChanged and:[Preferences cmdGesturesEnabled]) ifTrue:[^self blueButtonDown: anEvent].
- anEvent blueButtonChanged ifTrue:[^self blueButtonDown: anEvent].
"this mouse down could be the start of a gesture, or the end of a gesture focus"
(self isGestureStart: anEvent)
ifTrue: [^ self gestureStart: anEvent].
"Filter events sent to the subwidgets of non-MorphicModels in inactive windows, if they are not supposed to receive them due to windowActiveOnFirstClick being set to false. I don't like having this check for owningWindow here, is there another way?"
SystemWindow allWindowsAcceptInput
ifTrue:
[ self owningWindow
ifNil: [ self mouseDown: anEvent ]
ifNotNil:
[ : owningWindow |
(owningWindow canProcessMouseDown: anEvent)
ifTrue: [ self mouseDown: anEvent ]
ifFalse: [ owningWindow activate ] ] ]
ifFalse: [ self mouseDown: anEvent ].
Preferences maintainHalos
ifFalse:[ anEvent hand removeHaloFromClick: anEvent on: self ].
(self handlesMouseStillDown: anEvent) ifTrue:[
self startStepping: #handleMouseStillDown:
at: Time millisecondClockValue + self mouseStillDownThreshold
arguments: {anEvent copy resetHandlerFields}
stepTime: self mouseStillDownStepRate ].
!
tim Rowledge uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-tpr.1069.mcz
==================== Summary ====================
Name: Morphic-tpr.1069
Author: tpr
Time: 19 January 2016, 2:00:10.351434 pm
UUID: 080b7719-2b70-419c-91f3-4842337058a6
Ancestors: Morphic-mt.1068, Morphic-tpr.1068
This seems to be the best way to make sure that the preference 'cmd gestures enabled' being false results in no Halos.
If you have a nicer way, please replace this.
=============== Diff against Morphic-mt.1068 ===============
Item was changed:
----- Method: Morph>>handleMouseDown: (in category 'events-processing') -----
handleMouseDown: anEvent
"System level event handling."
anEvent wasHandled ifTrue:[^self]. "not interested"
anEvent hand removePendingBalloonFor: self.
anEvent hand removePendingHaloFor: self.
anEvent wasHandled: true.
(anEvent controlKeyPressed
and: [anEvent blueButtonChanged not
and: [Preferences cmdGesturesEnabled]])
ifTrue: [^ self invokeMetaMenu: anEvent].
"Make me modal during mouse transitions"
anEvent hand newMouseFocus: self event: anEvent.
+ (anEvent blueButtonChanged and:[Preferences cmdGesturesEnabled]) ifTrue:[^self blueButtonDown: anEvent].
- anEvent blueButtonChanged ifTrue:[^self blueButtonDown: anEvent].
"this mouse down could be the start of a gesture, or the end of a gesture focus"
(self isGestureStart: anEvent)
ifTrue: [^ self gestureStart: anEvent].
"Filter events sent to the subwidgets of non-MorphicModels in inactive windows, if they are not supposed to receive them due to windowActiveOnFirstClick being set to false. I don't like having this check for owningWindow here, is there another way?"
SystemWindow allWindowsAcceptInput
ifTrue:
[ self owningWindow
ifNil: [ self mouseDown: anEvent ]
ifNotNil:
[ : owningWindow |
(owningWindow canProcessMouseDown: anEvent)
ifTrue: [ self mouseDown: anEvent ]
ifFalse: [ owningWindow activate ] ] ]
ifFalse: [ self mouseDown: anEvent ].
Preferences maintainHalos
ifFalse:[ anEvent hand removeHaloFromClick: anEvent on: self ].
(self handlesMouseStillDown: anEvent) ifTrue:[
self startStepping: #handleMouseStillDown:
at: Time millisecondClockValue + self mouseStillDownThreshold
arguments: {anEvent copy resetHandlerFields}
stepTime: self mouseStillDownStepRate ].
!