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

karl ramberg karlramberg at gmail.com
Sat Dec 3 09:09:44 UTC 2022


PaintBoxMorph and SketchEditorMorphs are fighting back with the scaling
issues.

This is not a perfect fix.
  -Still some scaling issues on high definition displays, eg. the drawing
nib is too small
  -Color picker cursor still is not scaled

Best,
Karl

On Sat, Dec 3, 2022 at 12:46 AM <commits at source.squeak.org> wrote:

> 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.!
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20221203/beb95ba9/attachment.html>


More information about the Squeak-dev mailing list