Fix in SmallSenseCompletionWindow>>#openWindowModalAt: jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Mon, 01 Jul 2013 12:31:33 +0100
branchjv
changeset 13177 f8f283ea3f4c
parent 13176 54255ec9b267
child 13178 c9bf900fe729
Fix in SmallSenseCompletionWindow>>#openWindowModalAt:
smallsense/SmallSenseCompletionWindow.st
--- a/smallsense/SmallSenseCompletionWindow.st	Mon Jun 24 13:12:38 2013 +0100
+++ b/smallsense/SmallSenseCompletionWindow.st	Mon Jul 01 12:31:33 2013 +0100
@@ -325,6 +325,23 @@
     "Created: / 04-04-2011 / 21:12:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
+!SmallSenseCompletionWindow methodsFor:'opening'!
+
+openWindowModalAt:aPoint
+    "open the window as a modal dialog
+     - assumes that the builder has already setup the interface."
+
+    | windowExtent screenExtent|
+
+    windowExtent := builder window extent copy.
+    screenExtent := Screen current monitorBoundsAt: aPoint.
+    windowExtent y: (windowExtent y min: (screenExtent height - aPoint y)).  
+
+    builder openDialogAt:aPoint withExtent: windowExtent.
+
+    "Created: / 01-07-2013 / 12:22:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
 !SmallSenseCompletionWindow class methodsFor:'documentation'!
 
 version_HG