max extent handling
authorClaus Gittinger <cg@exept.de>
Mon, 04 Feb 2008 10:29:04 +0100
changeset 2264 26ee5a23ae95
parent 2263 e3784764ba54
child 2265 f6fbbcdd3764
max extent handling
UIPainter.st
--- a/UIPainter.st	Mon Feb 04 10:28:33 2008 +0100
+++ b/UIPainter.st	Mon Feb 04 10:29:04 2008 +0100
@@ -4680,12 +4680,20 @@
 "/    Transcript showCR:'generating windowSpec code...'.
 
     extentUsed := self canvas extent.
-    (extentUsed > (800 @ 600)) ifTrue:[
+    (extentUsed > (1024 @ 768)) ifTrue:[
+"/    (extentUsed > (800 @ 600)) ifTrue:[
         Dialog 
             warn:(resources
                 stringWithCRs:'The application''s default window-size is taken from the current size and will be %1.\\This may be too small on some displays - if required, resize and save again.'
                 with:extentUsed printString allBold)
     ].
+    (self canvas maxExtent notNil
+    and:[ extentUsed > self canvas maxExtent ]) ifTrue:[
+        Dialog 
+            warn:(resources
+                stringWithCRs:'The window-size is larger than its max-extent.\\This may lead to trouble (lost extent) later. I suggest removal of the max or resizing.'
+                with:extentUsed printString allBold)
+    ].
 
     code := painter generateWindowSpecMethodSource withCRs.
     (ReadStream on:code) fileIn.