#BUGFIX by ca
class: VerticalPanelView
added:
#beVisible
#beVisiblePostUpdate
windows: handle the vertical layout
--- a/VerticalPanelView.st Mon Dec 09 22:37:20 2019 +0100
+++ b/VerticalPanelView.st Tue Dec 10 16:45:14 2019 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
@@ -761,6 +763,38 @@
"Modified: 17.8.1997 / 15:19:58 / cg"
! !
+!VerticalPanelView methodsFor:'accessing-visibility'!
+
+beVisible
+ "after making the views visible check the vertical layout"
+
+ super beVisible.
+
+ (realized and:[OperatingSystem isMSWINDOWSlike])
+ ifFalse:[ ^ self ].
+
+ self sensor enqueueMessage:#beVisiblePostUpdate for:self.
+!
+
+beVisiblePostUpdate
+ "after making the views visible check the vertical layout"
+
+ | sviews |
+
+ self isVisible ifFalse:[ ^ self ].
+ sviews := self subViewsToConsider.
+ sviews size > 1 ifFalse:[ ^ self].
+
+ mustRearrange := true.
+ sviews do:[: eachChild |
+ eachChild height: 0.
+ eachChild height: (eachChild computePreferredExtent y).
+ ].
+ mustRearrange := true.
+ self setChildPositions.
+ mustRearrange := false.
+! !
+
!VerticalPanelView methodsFor:'layout'!
setChildPositions