#BUGFIX by cg
class: DialogBox
added: #verticalPanelIfPresent
changed: #modifyingBoxWith:do:
when a box gets modified,
care for any change in the size,
and ensure that it is repositioned into the screen
if so.
--- a/DialogBox.st Mon Aug 20 08:16:35 2018 +0200
+++ b/DialogBox.st Mon Aug 20 11:47:27 2018 +0200
@@ -6456,7 +6456,19 @@
ModifyBlock is called with the box as argument."
^ openingBlock on:self aboutToOpenBoxNotificationSignal do:[:ex |
- modifyBlock value:ex box.
+ |box heightBefore heightAfter vPanel|
+
+ box := ex box.
+ heightBefore := box height.
+ modifyBlock value:box.
+ (vPanel := box verticalPanelIfPresent) notNil ifTrue:[
+ vPanel height:(vPanel preferredHeight).
+ box forceResize.
+ ].
+ heightAfter := box height.
+ heightAfter ~= heightBefore ifTrue:[
+ box makeFullyVisible.
+ ].
].
"
@@ -6469,6 +6481,7 @@
"
"Modified (comment): / 15-05-2018 / 20:56:41 / stefan"
+ "Modified: / 20-08-2018 / 11:46:31 / Claus Gittinger"
!
withAdditionalOKButtonLabeled:aString action:action do:boxOpeningBlock
@@ -7328,6 +7341,12 @@
"Modified (comment): / 28-02-2012 / 15:46:23 / cg"
!
+verticalPanelIfPresent
+ ^ verticalPanel
+
+ "Created: / 20-08-2018 / 11:45:21 / Claus Gittinger"
+!
+
yesButton
"return the 'yes'-button"