Bert Freudenberg uploaded a new version of MorphicExtras to project Etoys:
http://source.squeak.org/etoys/MorphicExtras-bf.71.mcz==================== Summary ====================
Name: MorphicExtras-bf.71
Author: bf
Time: 24 June 2012, 8:34:07 pm
UUID: 06edc4a5-0577-4d5a-998b-1a2f473255f5
Ancestors: MorphicExtras-bf.70
Change Set: brushSizePref-sw
Date: 13 January 2012
Author: Scott Wallace
Adds a preference, 'singlePixelNib'. when this preference is on, the smallest brush icon in the etoys painting tool will represent a single-pixel-wide nib; when it's off, the smallest brush icon will represent a three-pixel-wide nib.
=============== Diff against MorphicExtras-bf.70 ===============
Item was changed:
----- Method: PaintBoxMorph class>>initialize (in category 'class initialization') -----
initialize
"PaintBoxMorph initialize"
Prototype eventHandler: nil.
Prototype focusMorph: nil.
Prototype stampHolder clear. "clear stamps"
Prototype delete. "break link to world, if any"
Prototype initializeBrush.
AllOnImage _ AllOffImage _ AllPressedImage _ nil.
OriginalBounds _ nil.
RecentColors _ nil.
+ Preferences addPreference: #singlePixelNib
+ categories: #(painting)
+ default: false
+ balloonHelp: 'when turned on, the smallest pen-size icon in the painting tool represents a single-pixel-wide painting nib; when turned off, that icon represents a three-pixel-wide pen'
+ projectLocal: false
+ changeInformee: PaintBoxMorph changeSelector: #smallestNibSizeChanged.
+ self smallestNibSizeChanged.!
- !
Item was added:
+ ----- Method: PaintBoxMorph class>>smallestNibSizeChanged (in category 'instance creation') -----
+ smallestNibSizeChanged
+ "The user changed the size of the smallest nib in the paint box. Change the prototype(s) to reflect this change."
+
+ | aWidth aButton |
+ aWidth := Preferences singlePixelNib ifTrue: [1] ifFalse:[3].
+ self allInstancesDo:
+ [:aPaintBox |
+ aButton := aPaintBox submorphNamed: #brush1:.
+ aButton arguments at: 3
+ put: (Form dotOfSize: aWidth).
+ aButton doButtonAction]!
_______________________________________________
etoys-dev mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/etoys-dev