The Trunk: Morphic-cmm.968.mcz

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

The Trunk: Morphic-cmm.968.mcz

commits-2
Chris Muller uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-cmm.968.mcz

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

Name: Morphic-cmm.968
Author: cmm
Time: 5 May 2015, 4:13:30.633 pm
UUID: 906a31d4-1930-44d0-971f-edcad6e71535
Ancestors: Morphic-mt.967

- The new simultaneous adjustment of sibling smart-splitters requires that dragging a smart-splitter equally affect siblings to stay put.
- The new simultaneous sibling adjustment feature is fixed for horizontal splitters.

=============== Diff against Morphic-mt.967 ===============

Item was changed:
  ----- Method: ProportionalSplitterMorph>>mouseDown: (in category 'events') -----
  mouseDown: anEvent
  "If the user manually drags me, don't override him with auto positioning."
  anEvent redButtonChanged
+ ifTrue: [ self withSiblingSplittersDo: [ : each | each stopStepping ] ]
- ifTrue: [ self stopStepping ]
  ifFalse:
  [ anEvent shiftPressed
  ifTrue: [ self startStepping ]
  ifFalse:
  [ self startStepping.
+ self withSiblingSplittersDo: [ : each | each startStepping ] ] ].
- self siblingSplittersDo: [ : each | each startStepping ] ] ].
  (self class showSplitterHandles not and: [ self bounds containsPoint: anEvent cursorPoint ]) ifTrue:
  [ oldColor := self color.
  self color: Color black ].
  ^ super mouseDown: anEvent!

Item was changed:
  ----- Method: ProportionalSplitterMorph>>siblingSplittersDo: (in category 'adjacent splitters') -----
  siblingSplittersDo: aBlock
+ owner ifNotNil:
- ^ owner ifNotNil:
  [ owner submorphsDo:
  [ : each | ((each isKindOf: self class) and:
  [ self splitsTopAndBottom = each splitsTopAndBottom and: [ each ~= self ] ]) ifTrue: [ aBlock value: each ] ] ]!

Item was changed:
  ----- Method: ProportionalSplitterMorph>>topBottomCorrection (in category 'layout') -----
  topBottomCorrection
  ^ self top < self topBoundary
  ifTrue: [ self topBoundary - self top ]
  ifFalse:
  [ self bottom > (self bottomBoundary)
  ifTrue: [ self bottomBoundary - self bottom ]
  ifFalse:
  [ | wsAbove wsBelow |
  wsAbove := self canEncroachWhiteSpaceOf: leftOrTop.
  wsBelow := self canEncroachWhiteSpaceOf: rightOrBottom.
  wsAbove
  ifTrue:
  [ wsBelow
  ifTrue:
  [ self splitterBelow
+ ifNil: [0]
+ ifNotNil: [ : below | below reduceTopBottomImbalance min: 0 ] ]
- ifNil: [ 0 ]
- ifNotNil: [ : below | below topBottomCorrection min: 0 ] ]
  ifFalse: [ (self top > self topBoundary) ifTrue: [-2] ifFalse: [0] ] ]
  ifFalse:
  [ wsBelow
  ifTrue: [ (self bottom < self bottomBoundary) ifTrue: [2] ifFalse: [0] ]
  ifFalse:
  [ self splitterBelow
+ ifNil: [0]
+ ifNotNil: [ : below | below reduceTopBottomImbalance max: 0 ] ] ] ] ]!
- ifNil: [ 0 ]
- ifNotNil: [ : below | below topBottomCorrection max: 0 ] ] ] ] ]!

Item was added:
+ ----- Method: ProportionalSplitterMorph>>withSiblingSplittersDo: (in category 'adjacent splitters') -----
+ withSiblingSplittersDo: aBlock
+ aBlock value: self.
+ self siblingSplittersDo: aBlock!