[Pkg] The Trunk: EToys-nice.78.mcz
commits at source.squeak.org
commits at source.squeak.org
Wed Dec 29 14:59:54 UTC 2010
Nicolas Cellier uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/EToys-nice.78.mcz
==================== Summary ====================
Name: EToys-nice.78
Author: nice
Time: 29 December 2010, 3:58:43.772 pm
UUID: 2fc3096b-3e18-4f08-8e76-b6c9d43455df
Ancestors: EToys-cmm.77
Add a few spaces in order to avoid Transcript warnings about @- ambiguity when recompiling.
=============== Diff against EToys-cmm.77 ===============
Item was changed:
----- Method: AlignmentMorph>>addUpDownArrowsFor: (in category '*Etoys-initialization') -----
addUpDownArrowsFor: aMorph
"Add a column of up and down arrows that serve to send upArrowHit and downArrowHit to aMorph when they're pressed/held down"
| holder downArrow upArrow |
holder := Morph new extent: 16 @ 16; beTransparent.
downArrow := ImageMorph new image: (ScriptingSystem formAtKey: 'DownArrow').
upArrow := ImageMorph new image: (ScriptingSystem formAtKey: 'UpArrow').
+ upArrow position: holder bounds topLeft + (2 @ 2).
- upArrow position: holder bounds topLeft + (2 at 2).
downArrow align: downArrow bottomLeft
+ with: holder topLeft + (0 @ TileMorph defaultH) + (2 @ -2).
- with: holder topLeft + (0 @ TileMorph defaultH) + (2 at -2).
holder addMorph: upArrow.
holder addMorph: downArrow.
self addMorphBack: holder.
upArrow on: #mouseDown send: #upArrowHit to: aMorph.
upArrow on: #mouseStillDown send: #upArrowHit to: aMorph.
downArrow on: #mouseDown send: #downArrowHit to: aMorph.
downArrow on: #mouseStillDown send: #downArrowHit to: aMorph.!
Item was changed:
----- Method: ScriptEditorMorph>>createThreadShowing (in category 'menu commands') -----
createThreadShowing
| vertices |
self deleteThreadShowing.
vertices := OrderedCollection new.
self tileRows do: [:row | | b |
row first isTurtleRow ifTrue: [
b := row first bounds.
+ vertices add: ((b topLeft + (4 @ 0)) + ((0 * 0.1 * b width) @ 0)).
- vertices add: ((b topLeft + (4 at 0)) + ((0 * 0.1 * b width)@0)).
0 to: 9 do: [:i |
+ vertices add: ((b topLeft + (4 @ 4))+ ((i * 0.1 * b width ) @ 0)).
+ vertices add: ((b bottomLeft + (4 @ -4)) + ((i * 0.1 * b width) @ 0)).
- vertices add: ((b topLeft + (4 at 4))+ ((i * 0.1 * b width )@0)).
- vertices add: ((b bottomLeft + (4 at -4)) + ((i * 0.1 * b width)@0)).
].
+ vertices add: ((b bottomLeft + (4 @ 0)) + ((9 * 0.1 * b width) @ 0)).
- vertices add: ((b bottomLeft + (4 at 0)) + ((9 * 0.1 * b width)@0)).
] ifFalse: [
b := row first bounds.
+ vertices add: ((b origin x + b corner x) // 2) @ (b origin y).
+ vertices add: ((b origin x + b corner x) // 2) @ (b origin y + 4).
+ vertices add: ((b origin x + b corner x) // 2) @ (b corner y - 4).
+ vertices add: ((b origin x + b corner x) // 2) @ (b corner y).
- vertices add: ((b origin x + b corner x)//2)@(b origin y).
- vertices add: ((b origin x + b corner x)//2)@(b origin y + 4).
- vertices add: ((b origin x + b corner x)//2)@(b corner y - 4).
- vertices add: ((b origin x + b corner x)//2)@(b corner y).
].
].
threadPolygon := PolygonMorph vertices: vertices color: Color black borderWidth: 2 borderColor: Color black.
threadPolygon makeOpen.
threadPolygon openInWorld.
!
Item was changed:
----- Method: ScriptEditorMorph>>extent: (in category 'other') -----
extent: x
| newExtent tw menu |
+ newExtent := x max: self minWidth @ self minHeight.
- newExtent := x max: self minWidth at self minHeight.
(tw := self findA: TwoWayScrollPane) ifNil:
["This was the old behavior"
^ super extent: newExtent].
(self hasProperty: #autoFitContents) ifTrue: [
menu := MenuMorph new defaultTarget: self.
menu addUpdating: #autoFitString target: self action: #autoFitOnOff.
menu addTitle: 'To resize the script, uncheck the box below' translated.
menu popUpEvent: nil in: self world .
^ self].
"Allow the user to resize to any size"
tw extent: ((newExtent x max: self firstSubmorph width)
+ @ (newExtent y - self firstSubmorph height)) - (borderWidth * 2) + (-4 @ -4). "inset?"
- @ (newExtent y - self firstSubmorph height)) - (borderWidth*2) + (-4 at -4). "inset?"
^ super extent: newExtent!
Item was changed:
----- Method: ViewerLine>>addGetterFeedback (in category 'slot') -----
addGetterFeedback
"Add feedback during mouseover of a getter"
| aMorph endMorph |
endMorph :=
(#(touchesA: #seesColor: #overlaps:) includes: self elementSymbol)
ifTrue:
[submorphs eighth]
ifFalse:
[submorphs sixth].
+ aMorph := RectangleMorph new useRoundedCorners bounds: ((submorphs fourth topLeft - (2 @ -1)) corner: (endMorph bottomRight + (2 @ -1))).
- aMorph := RectangleMorph new useRoundedCorners bounds: ((submorphs fourth topLeft - (2 at -1)) corner: (endMorph bottomRight + (2 at -1))).
aMorph beTransparent; borderWidth: 2; borderColor: (Color r: 1.0 g: 0.355 b: 0.839); lock.
aMorph setProperty: #highlight toValue: true.
ActiveWorld addMorphFront: aMorph
"
Color fromUser (Color r: 1.0 g: 0.355 b: 0.839)
"!
More information about the Packages
mailing list