[Pkg] The Treated Inbox: Morphic-kfr.2000.mcz
commits at source.squeak.org
commits at source.squeak.org
Wed Jun 22 13:11:57 UTC 2022
Marcel Taeumel uploaded a new version of Morphic to project The Treated Inbox:
http://source.squeak.org/treated/Morphic-kfr.2000.mcz
==================== Summary ====================
Name: Morphic-kfr.2000
Author: kfr
Time: 21 May 2022, 7:39:03.732977 pm
UUID: 9c8d4edd-b4ef-8649-a671-7a7f244a4662
Ancestors: Morphic-kfr.1999
Modal color picker balloon help must pop up above the tiny morphs, not on top of them
=============== 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 at: (m topCenter ).
+ 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