[Pkg] The Trunk: System-ar.302.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Mar 27 17:57:09 UTC 2010

Andreas Raab uploaded a new version of System to project The Trunk:

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

Name: System-ar.302
Author: ar
Time: 27 March 2010, 10:56:03.104 am
UUID: d7cde267-bfdf-a149-bb0c-6a98913c9c30
Ancestors: System-nice.301, System-tfel.300

Merging System-tfel.300:

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

=============== Diff against System-nice.301 ===============

Item was changed:
  ----- Method: Preferences class>>annotationEditingWindow (in category 'parameters') -----
  	"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;
  	outs := AlignmentMorph newColumn extent: standardWidth @ standardHeight.
  	outs color: Color red muchLighter.
  	outs enableDrop: true;
  	aPanel addMorph: outs;
  		 addMorphFront: ins.
  	outs position: ins position + (standardWidth @ 0).
  	current := self defaultAnnotationRequests.
  	info := self annotationInfo.
  		do: [:sym | | pair aMorph | 
  			pair := info
  						detect: [:aPair | aPair first == sym].
  			aMorph := StringMorph new contents: pair first.
  			aMorph setBalloonText: pair last.
  			aMorph enableDrag: true.
  				on: #startDrag
  				send: #startDrag:with:
  				to: aMorph.
  			ins addMorphBack: aMorph].
  		do: [:aPair | (current includes: aPair first)
  				ifFalse: [| aMorph |
  					aMorph := StringMorph new contents: aPair first.
  					aMorph setBalloonText: aPair last.
  					aMorph enableDrag: true.
  						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;
  	^ aPanel wrappedInWindow: aWindow"Preferences annotationEditingWindow openInHand"!

More information about the Packages mailing list