ModalBox.st
changeset 5678 414d0473ad21
parent 5626 0d7703a9eef6
child 5889 14c5d1960530
--- a/ModalBox.st	Thu Jan 20 22:42:28 2011 +0100
+++ b/ModalBox.st	Fri Jan 21 13:58:59 2011 +0100
@@ -413,20 +413,24 @@
     |newExtent maxExtent|
 
     newExtent := self preferredExtent.
+    newExtent := newExtent min:(device extent).
+
     maxExtent := self maxExtent.
     maxExtent notNil ifTrue:[
-	newExtent := newExtent min:maxExtent.
+        newExtent := newExtent min:maxExtent.
     ].
     newExtent ~= self extent ifTrue:[
-	(shown and:[shadowView notNil]) ifTrue:[
-	    shadowView unmap.
-	    self extent:newExtent.
-	    shadowView realize.
-	    self raise
-	] ifFalse:[
-	    self extent:newExtent.
-	].
+        (shown and:[shadowView notNil]) ifTrue:[
+            shadowView unmap.
+            self extent:newExtent.
+            shadowView realize.
+            self raise
+        ] ifFalse:[
+            self extent:newExtent.
+        ].
     ].
+
+    "Modified: / 21-01-2011 / 13:50:11 / cg"
 !
 
 resizeUnderPointer
@@ -740,14 +744,14 @@
 
     self fixSize.
     centerX ifTrue:[
-	dx := self width // 2.
+        dx := self width // 2.
     ] ifFalse:[
-	dx := 0
+        dx := 0
     ].
     centerY ifTrue:[
-	dy := self height // 2.
+        dy := self height // 2.
     ] ifFalse:[
-	dy := 0
+        dy := 0
     ].
     self origin:(aPoint - (dx @ dy)).
     self makeFullyVisible.
@@ -760,6 +764,8 @@
      b showAt:(100 @ 100).
      b showAt:(100 @ 100) centerX:true centerY:false.
     "
+
+    "Modified: / 21-01-2011 / 13:58:29 / cg"
 !
 
 showAtCenter
@@ -910,11 +916,11 @@
 !ModalBox class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/ModalBox.st,v 1.106 2010-10-22 12:56:26 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/ModalBox.st,v 1.107 2011-01-21 12:58:59 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libview/ModalBox.st,v 1.106 2010-10-22 12:56:26 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/ModalBox.st,v 1.107 2011-01-21 12:58:59 cg Exp $'
 ! !
 
 ModalBox initialize!