[Pkg] The Treated Inbox: Morphic-kfr.1999.mcz
commits at source.squeak.org
commits at source.squeak.org
Wed Jun 22 13:12:03 UTC 2022
Marcel Taeumel uploaded a new version of Morphic to project The Treated Inbox:
http://source.squeak.org/treated/Morphic-kfr.1999.mcz
==================== Summary ====================
Name: Morphic-kfr.1999
Author: kfr
Time: 21 May 2022, 11:13:32.096027 am
UUID: 0ddb652d-608a-b648-bf94-63cb89c259c5
Ancestors: Morphic-kfr.1998
Offset of temporary cursor was off
=============== Diff against Morphic-ct.1996 ===============
Item was changed:
----- Method: ColorPickerMorph>>modalBalloonHelpAtPoint: (in category 'private') -----
modalBalloonHelpAtPoint: cursorPoint
self flag: #arNote. "Throw this away. There needs to be another way."
self submorphsDo:
[:m |
m wantsBalloon
ifTrue:
[(m valueOfProperty: #balloon) isNil
ifTrue:
+ [(m containsPoint: cursorPoint) ifTrue: [m showBalloon: m balloonText.
+ m setProperty: #balloon toValue: true]]
+ ifFalse: [(m containsPoint: cursorPoint) ifFalse: [self deleteBalloon.
+ m setProperty: #balloon toValue:nil]]]]!
- [(m containsPoint: cursorPoint) ifTrue: [m showBalloon: m balloonText]]
- ifFalse: [(m containsPoint: cursorPoint) ifFalse: [m deleteBalloon]]]]!
Item was changed:
----- Method: ColorPickerMorph>>pickUpColorFor: (in category 'menu') -----
pickUpColorFor: aMorph
"Show the eyedropper cursor, and modally track the mouse through a mouse-down and mouse-up cycle"
| aHand localPt c |
aHand := aMorph ifNil: [self activeHand] ifNotNil: [aMorph activeHand].
aHand ifNil: [aHand := self currentHand].
self addToWorld: aHand world near: (aMorph ifNil: [aHand world]) fullBounds.
self owner ifNil: [^ self].
aHand showTemporaryCursor: (ScriptingSystem formAtKey: #Eyedropper)
+ hotSpotOffset: 2 at 14. "<<<< the form was changed a bit??"
- hotSpotOffset: 6 negated @ 4 negated. "<<<< the form was changed a bit??"
self updateContinuously: false.
[Sensor anyButtonPressed]
whileFalse:
[self trackColorUnderMouse].
self deleteAllBalloons.
localPt := Sensor cursorPoint - self topLeft.
self inhibitDragging ifFalse: [
(DragBox containsPoint: localPt) ifTrue:
["Click or drag the drag-dot means to anchor as a modeless picker"
^ self anchorAndRunModeless: aHand].
].
(clickedTranslucency := TransparentBox containsPoint: localPt)
ifTrue: [selectedColor := originalColor].
self updateContinuously: true.
[Sensor anyButtonPressed]
whileTrue:
[self updateTargetColorWith: self indicateColorUnderMouse].
c := self getColorFromKedamaWorldIfPossible: Sensor cursorPoint.
c ifNotNil: [selectedColor := c].
aHand newMouseFocus: nil;
showTemporaryCursor: nil;
flushEvents.
self delete.
!
Item was changed:
----- Method: Morph>>changeColor (in category 'menus') -----
changeColor
"Change the color of the receiver -- triggered, e.g. from a menu"
NewColorPickerMorph useIt
ifTrue: [ (NewColorPickerMorph on: self) openNear: self fullBoundsInWorld ]
ifFalse:
+ [ self removeHalo."Halo can obscure the color picker"
+ ColorPickerMorph new
- [ ColorPickerMorph new
choseModalityFromPreference ;
sourceHand: self activeHand ;
target: self ;
selector: #fillStyle: ;
originalColor: self color ;
putUpFor: self
near: self fullBoundsInWorld ]!
More information about the Packages
mailing list