'From Squeak3.1alpha of 5 February 2001 [latest update: #3684] on 21 February 2001 at 11:11:22 am'! "Change Set: appearance5 Date: 21 February 2001 Author: Bob Arning adds gradient origin and direction to object properties panel"! !ObjectPropertiesMorph methodsFor: 'as yet unclassified' stamp: 'RAA 2/21/2001 10:47'! adjustTargetBorderWidth: aFractionalPoint targetMorph borderWidth: ((aFractionalPoint x * 10) rounded max: 0)! ! !ObjectPropertiesMorph methodsFor: 'as yet unclassified' stamp: 'RAA 2/21/2001 11:08'! adjustTargetGradientDirection: aFractionalPoint | fs | (fs _ targetMorph fillStyle) isGradientFill ifFalse: [^self]. fs direction: (aFractionalPoint * targetMorph extent) rounded. targetMorph changed. ! ! !ObjectPropertiesMorph methodsFor: 'as yet unclassified' stamp: 'RAA 2/21/2001 11:02'! adjustTargetGradientOrigin: aFractionalPoint | fs | (fs _ targetMorph fillStyle) isGradientFill ifFalse: [^self]. fs origin: targetMorph topLeft + (aFractionalPoint * targetMorph extent) rounded. targetMorph changed. ! ! !ObjectPropertiesMorph methodsFor: 'as yet unclassified' stamp: 'RAA 2/21/2001 10:45'! mouseAdjust: evt in: aMorph | fractionalPosition | fractionalPosition _ (evt cursorPoint - aMorph topLeft) / aMorph extent. self perform: (aMorph valueOfProperty: #changeSelector) with: fractionalPosition ! ! !ObjectPropertiesMorph methodsFor: 'as yet unclassified' stamp: 'RAA 2/21/2001 11:02'! toggleTargetRadial | fs | (fs _ targetMorph fillStyle) isGradientFill ifFalse: [^self]. fs radial: fs radial not. targetMorph changed. self doEnables.! ! !ObjectPropertiesMorph methodsFor: 'panes' stamp: 'RAA 2/21/2001 11:06'! paneFor2ndGradientColorPicker ^self inAColumn: { (self inAColumn: { self colorPickerFor: self getter: #tgt2ndGradientColor setter: #tgt2ndGradientColor:. self lockedString: '2nd gradient color'. self paneForRadialGradientToggle. self inARow: {self paneForGradientOrigin. self paneForGradientDirection}. } named: #pickerFor2ndGradientColor) layoutInset: 0. self inAColumn: { self paneForGradientFillToggle. } } ! ! !ObjectPropertiesMorph methodsFor: 'panes' stamp: 'RAA 2/21/2001 10:58'! paneForBorderWidth ^(self inARow: { self buildFakeSlider: 'Border width' selector: #adjustTargetBorderWidth: help: 'Drag in here to change the border width' }) hResizing: #shrinkWrap ! ! !ObjectPropertiesMorph methodsFor: 'panes' stamp: 'RAA 2/21/2001 11:05'! paneForGradientDirection ^(self inARow: { self buildFakeSlider: 'Direction' selector: #adjustTargetGradientDirection: help: 'Drag in here to change the direction of the gradient' }) hResizing: #shrinkWrap ! ! !ObjectPropertiesMorph methodsFor: 'panes' stamp: 'RAA 2/21/2001 10:51'! paneForGradientOrigin ^(self inARow: { self buildFakeSlider: 'Origin' selector: #adjustTargetGradientOrigin: help: 'Drag in here to change the origin of the gradient' }) hResizing: #shrinkWrap ! !