The Trunk: System-ar.302.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: System-ar.302.mcz

commits-2
Andreas Raab uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-ar.302.mcz

==================== 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') -----
  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"!