[squeak-dev] The Trunk: Morphic-laza.206.mcz

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

[squeak-dev] The Trunk: Morphic-laza.206.mcz

commits-2
Alexander Lazarević uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-laza.206.mcz

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

Name: Morphic-laza.206
Author: laza
Time: 9 October 2009, 11:45:50 am
UUID: 0e18421c-498b-9946-88cb-c21791ae921e
Ancestors: Morphic-MAD.205

Use a centered layout if labels are too long

=============== Diff against Morphic-MAD.205 ===============

Item was changed:
  ----- Method: SystemProgressMorph class>>initialize (in category 'class initialization') -----
  initialize
  "SystemProgressMorph initialize; reset"
  BarHeight := 8.
+ BarWidth := 300.
+ Inset := 30@30!
- BarWidth := 300!

Item was changed:
  RectangleMorph subclass: #SystemProgressMorph
  instanceVariableNames: 'activeSlots bars labels font lock'
+ classVariableNames: 'BarHeight BarWidth Inset UniqueInstance'
- classVariableNames: 'BarHeight BarWidth UniqueInstance'
  poolDictionaries: ''
  category: 'Morphic-Widgets'!
 
  !SystemProgressMorph commentStamp: '<historical>' prior: 0!
  An single instance of this morph class is used to display progress while the system is busy, eg. while it receives code updates or does a fileIn. To give the user progress information you don't deal directly with SystemProgressMorph. You keep on using the well established way of progress notification, that has been a long time in the system, is widely used and does not depend on the existence of SystemProgressMorph. For more information on this look at the example in this class or look at the comment of the method displayProgressAt:from:to:during: in class String.
 
  SystemProgressMorph is not meant to be used as a component inside other morphs.
 
  You can switch back to the old style of progress display by disabling the morphicProgressStyle setting in the morphic section of the preferences.!

Item was changed:
  ----- Method: SystemProgressMorph>>recenter (in category 'private') -----
  recenter
+ | position |
+ "Put ourself in the center of the display"
  self align: self fullBounds center with: Display boundingBox center.
+ "Check to see if labels are wider than progress bars. In that case do
+ a centered instead of the default left aligned layout."
+ position := self width > (Inset x * 2 + (self borderWidth * 2) + BarWidth)
+ ifTrue: [#topCenter]
+ ifFalse: [#leftCenter].
+ self cellPositioning: position!
- !

Item was changed:
  ----- Method: SystemProgressMorph>>initialize (in category 'initialization') -----
  initialize
  super initialize.
  activeSlots := 0.
  bars := Array new: 10.
  labels := Array new: 10.
  font := Preferences standardMenuFont.
  lock := Semaphore forMutualExclusion.
  self setDefaultParameters;
  setProperty: #morphicLayerNumber toValue: self morphicLayerNumber;
  layoutPolicy: TableLayout new;
  listDirection: #topToBottom;
  cellPositioning: #leftCenter;
  cellInset: 5;
  listCentering: #center;
  hResizing: #shrinkWrap;
  vResizing: #shrinkWrap;
+ layoutInset: Inset;
- layoutInset:30@30;
  minWidth: 150!