[squeak-dev] The Inbox: MorphicExtras-kfr.339.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Dec 2 23:45:54 UTC 2022


A new version of MorphicExtras was added to project The Inbox:
http://source.squeak.org/inbox/MorphicExtras-kfr.339.mcz

==================== Summary ====================

Name: MorphicExtras-kfr.339
Author: kfr
Time: 3 December 2022, 12:45:52.792307 am
UUID: cb1428dc-dec9-7b45-8015-436b49674bc1
Ancestors: MorphicExtras-ct.338

Fixes issue with scale of tool cursor and offset

=============== Diff against MorphicExtras-ct.338 ===============

Item was added:
+ ----- Method: SketchEditorMorph>>cursor:enlargedBy: (in category 'event handling') -----
+ cursor: aForm enlargedBy: scale
+ 	"Big cursors are 32 bits deep (ARGB premultiplied)"
+ 	| big |
+ 	
+ 	big := CursorWithAlpha extent: aForm extent * scale depth: 32.
+ 	(aForm asCursorForm magnifyBy: scale) displayOn: big.
+ 	big offset: (aForm offset - 0.5 * scale min: 0 at 0 max: big extent negated) asIntegerPoint.
+ 	
+ 	^big!

Item was changed:
  ----- Method: SketchEditorMorph>>mouseEnter: (in category 'event handling') -----
  mouseEnter: evt
  	"Set the cursor.  Reread colors if embedded editable polygon needs it."
  
  	| poly cColor |
  	super mouseEnter: evt.
  	(self get: #action for: evt) == #scaleOrRotate ifTrue: [
  		self set: #action for: evt to: (self get: #priorAction for: evt).
  		].	"scale and rotate are not real modes.  If we enter with one, wear the previous tool."
+ 	evt hand showTemporaryCursor: (self cursor:(self getCursorFor: evt) enlargedBy: 1).
- 	evt hand showTemporaryCursor: (self getCursorFor: evt).
  	palette getSpecial == #polygon: ifFalse: [^self].
  	(poly := self valueOfProperty: #polygon) ifNil: [^ self].
  	cColor := self getColorFor: evt.
  	poly borderColor: cColor; borderWidth: (self getNibFor: evt) width.
  	poly changed.!



More information about the Squeak-dev mailing list