The Trunk: Morphic-cmm.1432.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.1432.mcz

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

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

Name: Morphic-cmm.1432
Author: cmm
Time: 15 May 2018, 4:02:47.931373 pm
UUID: a046716c-635d-4c98-b1d8-0b45b7a084c8
Ancestors: Morphic-mt.1431

Fix regression with splitter widths.

=============== Diff against Morphic-mt.1431 ===============

Item was changed:
  ----- Method: ProportionalSplitterMorph>>balanceOffsets (in category 'layout') -----
  balanceOffsets
- (self valueOfProperty: #fullDelta) ifNil: [self setProperty: #fullDelta toValue: (0@0)] .
 
+ (self hasProperty: #fullDelta) ifFalse: [^ self].
+
  self layoutFrame hasFixedHeight ifTrue: [
  | otop obot ctop cbot topf |
 
  otop := (owner submorphs detect: [:m |
  m layoutFrame topFraction isZero] ifNone: [^ self]) in: [:tm |
  tm top - (tm layoutFrame topOffset ifNil: [0])].
 
  obot := (owner submorphs detect: [:m |
  m layoutFrame bottomFraction = 1] ifNone: [^ self]) in: [:tm |
  tm bottom - (tm layoutFrame bottomOffset ifNil: [0])].
 
  ctop := (self layoutFrame topFraction * (obot - otop)) rounded
  + otop + (self layoutFrame topOffset ifNil: [0]).
  cbot := (self layoutFrame bottomFraction * (obot - otop)) rounded
  + otop + (self layoutFrame bottomOffset ifNil: [0]).
 
  topf := self layoutFrame topFraction.
  self layoutFrame topFraction:  ((ctop + cbot) * 0.5 - otop) / (obot - otop) asFloat.
  self layoutFrame bottomFraction: self layoutFrame topFraction.
  self layoutFrame topOffset: ctop -
+ (self layoutFrame topFraction * (obot - otop) + otop) truncated.
- (self layoutFrame topFraction * (obot - otop) + otop) rounded.
  self layoutFrame bottomOffset: cbot -
+ (self layoutFrame bottomFraction * (obot - otop) + otop) rounded.
- (self layoutFrame bottomFraction * (obot - otop) + otop) rounded..
 
  (leftOrTop copy union: rightOrBottom) do: [:m |
  (m layoutFrame topFraction closeTo: topf) ifTrue: [
  m layoutFrame topFraction: self layoutFrame topFraction.
  m layoutFrame topOffset:
  m layoutFrame topOffset - (self valueOfProperty: #fullDelta) y].
  (m layoutFrame bottomFraction closeTo: topf) ifTrue: [
  m layoutFrame bottomFraction: self layoutFrame topFraction.
  m layoutFrame bottomOffset:
  m layoutFrame bottomOffset - (self valueOfProperty: #fullDelta) y.]]] .
 
  self layoutFrame hasFixedWidth ifTrue: [
  | oleft oright cleft cright leftf |
 
  oleft := (owner submorphs detect: [:m |
  m layoutFrame leftFraction isZero] ifNone: [^ self]) in: [:tm |
  tm left - (tm layoutFrame leftOffset ifNil: [0])].
 
  oright := (owner submorphs detect: [:m |
  m layoutFrame rightFraction = 1] ifNone: [^ self]) in: [:tm |
  tm right - (tm layoutFrame rightOffset ifNil: [0])].
 
  cleft := (self layoutFrame leftFraction * (oright - oleft)) rounded
  + oleft + (self layoutFrame leftOffset ifNil: [0]).
  cright := (self layoutFrame rightFraction * (oright - oleft)) rounded
  + oleft + (self layoutFrame rightOffset ifNil: [0]).
 
  leftf := self layoutFrame leftFraction.
  self layoutFrame leftFraction: ((cleft + cright) * 0.5 - oleft) / (oright - oleft) asFloat.
  self layoutFrame rightFraction: self layoutFrame leftFraction.
 
  self layoutFrame leftOffset: cleft -
+ (self layoutFrame leftFraction * (oright - oleft) + oleft) truncated.
- (self layoutFrame leftFraction * (oright - oleft) + oleft) rounded.
  self layoutFrame rightOffset: cright -
  (self layoutFrame rightFraction * (oright - oleft) + oleft) rounded.
 
  (leftOrTop copy union: rightOrBottom) do: [:m |
  (m layoutFrame leftFraction closeTo: leftf) ifTrue: [
  m layoutFrame leftFraction: self layoutFrame leftFraction.
  m layoutFrame leftOffset:
  m layoutFrame leftOffset - (self valueOfProperty: #fullDelta) x].
  (m layoutFrame rightFraction closeTo: leftf) ifTrue: [
  m layoutFrame rightFraction: self layoutFrame leftFraction.
  m layoutFrame rightOffset:
  m layoutFrame rightOffset - (self valueOfProperty: #fullDelta) x.]]] .
 
  self removeProperty: #fullDelta.
  owner layoutChanged
  !