Permalink
Browse files

Fix splitter issue with Sean

  • Loading branch information...
BenjaminVanRyseghem committed Apr 1, 2014
1 parent 5ce41d6 commit b59dcf9e9cd0ca3bc2850f4b54aaeb394b9517a4
@@ -0,0 +1,4 @@
*Spec-MorphicAdapters
isHorizontallyResizeable

^ self rightFraction ~= self leftFraction
@@ -0,0 +1,4 @@
*Spec-MorphicAdapters
isVerticallyResizeable

^ self bottomFraction ~= self topFraction
@@ -0,0 +1,6 @@
{
"class" : {
},
"instance" : {
"isHorizontallyResizeable" : "BenjaminVanRyseghem 4/1/2014 12:55",
"isVerticallyResizeable" : "BenjaminVanRyseghem 4/1/2014 12:55" } }
@@ -0,0 +1,2 @@
{
"name" : "LayoutFrame" }
@@ -0,0 +1,17 @@
*Spec-MorphicAdapters
checkMorphsLeftOrTopFrom: splitter
| index size |

size := submorphs size.
index := submorphs identityIndexOf: splitter.

index := index + 1.

[ index <= size ] whileTrue: [
| submorph done |
submorph := submorphs at: index.
splitter addLeftOrTop: submorph.
done := self isResizeableMorph: submorph forSplitter: splitter.
done
ifTrue: [ index := size + 1 ].
index := index + 1 ]
@@ -0,0 +1,16 @@
*Spec-MorphicAdapters
checkMorphsLeftOrTopFrom: splitter size: size
| index |

index := submorphs identityIndexOf: splitter.

index := index + 1.

[ index <= size ] whileTrue: [
| submorph done |
submorph := submorphs at: index.
splitter addLeftOrTop: submorph.
done := self isResizeableMorph: submorph forSplitter: splitter.
done
ifTrue: [ index := size + 1 ].
index := index + 1 ]
@@ -0,0 +1,13 @@
*Spec-MorphicAdapters
checkMorphsRightOrBottomFrom: splitter
| index |

index := submorphs identityIndexOf: splitter.
index := index - 1.

[ index > 0 ] whileTrue: [ | submorph done |
submorph := submorphs at: index.
splitter addRightOrBottom: submorph.
done := self isResizeableMorph: submorph forSplitter: splitter.
done ifTrue: [ index := 0 ].
index := index - 1 ]
@@ -1,19 +1,7 @@
*Spec-MorphicAdapters
checkSplitters
| size |

size := submorphs size.
(self submorphsSatisfying: [:e | e isKindOf: ProportionalSplitterMorph ]) do: [:e || index idx |
index := submorphs identityIndexOf: e.
idx := index + 1.
"above"
[ idx <= size and: [ ((submorphs at: idx) isKindOf: ProportionalSplitterMorph) not ]] whileTrue: [
e addLeftOrTop: (submorphs at: idx).
idx := idx +1 ].

idx := index - 1.

"below"
[ idx > 0 and: [ ((submorphs at: idx) isKindOf: ProportionalSplitterMorph) not ]] whileTrue: [
e addRightOrBottom: (submorphs at: idx).
idx := idx -1 ]]
(self submorphsSatisfying: [ :e | e isKindOf: ProportionalSplitterMorph ])
do: [ :splitter |
self checkMorphsLeftOrTopFrom: splitter.
self checkMorphsRightOrBottomFrom: splitter ]
@@ -0,0 +1,7 @@
*Spec-MorphicAdapters
isResizeableMorph: submorph forSplitter: e
| done |
done := e splitsTopAndBottom
ifTrue: [ submorph layoutFrame isVerticallyResizeable ]
ifFalse: [ submorph layoutFrame isHorizontallyResizeable ].
^ done
@@ -2,7 +2,11 @@
"class" : {
},
"instance" : {
"checkSplitters" : "BenjaminVanRyseghem 7/31/2012 18:08",
"checkMorphsLeftOrTopFrom:" : "BenjaminVanRyseghem 4/1/2014 13:19",
"checkMorphsLeftOrTopFrom:size:" : "BenjaminVanRyseghem 4/1/2014 13:17",
"checkMorphsRightOrBottomFrom:" : "BenjaminVanRyseghem 4/1/2014 13:16",
"checkSplitters" : "BenjaminVanRyseghem 4/1/2014 13:18",
"isResizeableMorph:forSplitter:" : "BenjaminVanRyseghem 4/1/2014 13:05",
"newHSplitter" : "BenjaminVanRyseghem 7/31/2012 15:47",
"newHSplitterAt:" : "IgorStasenko 12/19/2012 18:00",
"newVSplitter" : "BenjaminVanRyseghem 7/31/2012 15:47",

Large diffs are not rendered by default.

Oops, something went wrong.

0 comments on commit b59dcf9

Please sign in to comment.