# HG changeset patch # User Claus Gittinger # Date 1563352318 -7200 # Node ID 362d9b0f6b4752d814a2ec5a44eb8d46822edaa4 # Parent 79c13fe7d6bcfc7435355fa3fd3e1d7e32f117f1 #REFACTORING by cg class: UIObjectView added: #findContainerOfView: changed: #alignResizeSelectionRight #alignSelectionBottom #alignSelectionTop #alignSelectionTopAndBottom diff -r 79c13fe7d6bc -r 362d9b0f6b47 UIObjectView.st --- a/UIObjectView.st Tue Jul 16 16:41:59 2019 +0200 +++ b/UIObjectView.st Wed Jul 17 10:31:58 2019 +0200 @@ -1341,6 +1341,12 @@ !UIObjectView methodsFor:'private'! +findContainerOfView:view + self subclassResponsibility + + "Created: / 17-07-2019 / 10:29:36 / Claus Gittinger" +! + undoHistoryChanged self hasUndoHistoryHolder value:(self hasUndoHistory). ! ! @@ -2346,13 +2352,14 @@ ] ] ifFalse:[ self extentToFrame:#Right do:[:aLayout| - aLayout rightOffset:0. - aLayout rightFraction:1.0. + aLayout rightFraction:1.0 offset:0. ] ] ]. self layoutChanged ] + + "Modified: / 17-07-2019 / 10:25:26 / Claus Gittinger" ! alignSelectionBottom @@ -2362,27 +2369,25 @@ |bmost delta sel| (sel := self moveableSelection) notNil ifTrue:[ - self withSelectionHiddenDo:[ - self numberOfSelections > 1 ifTrue:[ - bmost := (sel first) computeCorner y. - - self transaction:#alignBottom selectionDo:[:v| - (delta := bmost - (v computeCorner y)) ~~ 0 ifTrue:[ - self shiftLayout:v top:delta bottom:delta. - ] - ] - ] ifFalse:[ - self extentToFrame:#Bottom do:[:aLayout| - aLayout bottomOffset:0. - aLayout bottomFraction:1.0 - ] - ] - ]. - self layoutChanged + self withSelectionHiddenDo:[ + self numberOfSelections > 1 ifTrue:[ + bmost := (sel first) computeCorner y. + + self transaction:#alignBottom selectionDo:[:v| + (delta := bmost - (v computeCorner y)) ~~ 0 ifTrue:[ + self shiftLayout:v top:delta bottom:delta. + ] + ] + ] ifFalse:[ + self extentToFrame:#Bottom do:[:aLayout| + aLayout bottomFraction:1.0 offset:0 + ] + ] + ]. + self layoutChanged ] - - + "Modified: / 17-07-2019 / 10:28:49 / Claus Gittinger" ! alignSelectionCenterHor @@ -2563,25 +2568,25 @@ |tmost delta sel| (sel := self moveableSelection) notNil ifTrue:[ - self withSelectionHiddenDo:[ - self numberOfSelections > 1 ifTrue:[ - tmost := (sel first) computeOrigin y. - - self transaction:#alignTop selectionDo:[:v| - (delta := tmost - (v computeOrigin y)) ~~ 0 ifTrue:[ - self shiftLayout:v top:delta bottom:delta - ] - ] - ] ifFalse:[ - self extentToFrame:#Top do:[:aLayout| - aLayout topOffset:0. - aLayout topFraction:0.0. - ] - ] - ]. - self layoutChanged + self withSelectionHiddenDo:[ + self numberOfSelections > 1 ifTrue:[ + tmost := (sel first) computeOrigin y. + + self transaction:#alignTop selectionDo:[:v| + (delta := tmost - (v computeOrigin y)) ~~ 0 ifTrue:[ + self shiftLayout:v top:delta bottom:delta + ] + ] + ] ifFalse:[ + self extentToFrame:#Top do:[:aLayout| + aLayout topFraction:0.0 offset:0. + ] + ] + ]. + self layoutChanged ] + "Modified: / 17-07-2019 / 10:23:29 / Claus Gittinger" ! alignSelectionTopAndBottom @@ -2620,15 +2625,15 @@ ] ] ifFalse:[ self extentToFrame:#TopBottom do:[:aLayout| - aLayout topOffset:0. - aLayout topFraction:0.0. - aLayout bottomOffset:0. - aLayout bottomFraction:1.0. + aLayout topFraction:0.0 offset:0. + aLayout bottomFraction:1.0 offset:0. ] ] ]. self layoutChanged ] + + "Modified: / 17-07-2019 / 10:24:00 / Claus Gittinger" ! centerSelection:aOneArgBlockXorY orientation:orientation