[squeak-dev] The Inbox: System-tfel.300.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Mar 27 13:01:46 UTC 2010


A new version of System was added to project The Inbox:
http://source.squeak.org/inbox/System-tfel.300.mcz

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

Name: System-tfel.300
Author: tfel
Time: 27 March 2010, 1:34:51.852 pm
UUID: e6721756-0ba3-4134-8c5f-a94316905b84
Ancestors: System-nice.299

Change the sizing of the Annotations Tool - with the new fonts, the box would overflow the window

=============== Diff against System-nice.299 ===============

Item was changed:
  ----- Method: Preferences class>>annotationEditingWindow (in category 'parameters') -----
  annotationEditingWindow
  	"Answer a window affording editing of annotations"
  	| aPanel ins outs current aWindow aButton info standardHeight standardWidth |
+ 	standardHeight := 200.
- 	standardHeight := 180.
  	standardWidth := (2 sqrt reciprocal * standardHeight) rounded.
  	Smalltalk isMorphic
  		ifFalse: [self error: 'annotations can be edited only in morphic'].
  	aPanel := AlignmentMorph newRow extent: 2 * standardWidth @ standardHeight.
  	ins := AlignmentMorph newColumn extent: standardWidth @ standardHeight.
  	ins color: Color green muchLighter.
  	ins enableDrop: true;
  		 beSticky.
  	outs := AlignmentMorph newColumn extent: standardWidth @ standardHeight.
  	outs color: Color red muchLighter.
  	outs enableDrop: true;
  		 beSticky.
  	aPanel addMorph: outs;
  		 addMorphFront: ins.
  	outs position: ins position + (standardWidth @ 0).
  	current := self defaultAnnotationRequests.
  	info := self annotationInfo.
  	current
  		do: [:sym | | pair aMorph | 
  			pair := info
  						detect: [:aPair | aPair first == sym].
  			aMorph := StringMorph new contents: pair first.
  			aMorph setBalloonText: pair last.
  			aMorph enableDrag: true.
  			aMorph
  				on: #startDrag
  				send: #startDrag:with:
  				to: aMorph.
  			ins addMorphBack: aMorph].
  	info
  		do: [:aPair | (current includes: aPair first)
  				ifFalse: [| aMorph |
  					aMorph := StringMorph new contents: aPair first.
  					aMorph setBalloonText: aPair last.
  					aMorph enableDrag: true.
  					aMorph
  						on: #startDrag
  						send: #startDrag:with:
  						to: aMorph.
  					outs addMorph: aMorph]].
  	aPanel layoutChanged.
  	aWindow := SystemWindowWithButton new setLabel: 'Annotations'.
  	aButton := SimpleButtonMorph new target: Preferences;
  				 actionSelector: #acceptAnnotationsFrom:;
  				
  				arguments: (Array with: aWindow);
  				 label: 'apply';
  				 borderWidth: 0;
  				 borderColor: Color transparent;
  				 color: Color transparent.
  	aButton submorphs first color: Color blue.
  	aButton setBalloonText: 'After moving all the annotations you want to the left (green) side, and all the ones you do NOT want to the right (pink) side, hit this "apply" button to have your choices take effect.'.
  	aWindow buttonInTitle: aButton;
  		 adjustExtraButton.
  	^ aPanel wrappedInWindow: aWindow"Preferences annotationEditingWindow openInHand"!




More information about the Squeak-dev mailing list