]> git.mxchange.org Git - flightgear.git/commitdiff
resize in SE direction (draggable borders planned)
authormfranz <mfranz>
Sat, 10 Jan 2009 23:43:32 +0000 (23:43 +0000)
committerTim Moore <timoore@redhat.com>
Mon, 12 Jan 2009 12:04:03 +0000 (13:04 +0100)
src/GUI/dialog.cxx

index dad53b3ddecccc8d384483a3ecacea9719c3d850..8ae6d2ebd7897c5f1ec6267a97dbc851109b52df 100644 (file)
@@ -226,11 +226,10 @@ int fgPopup::checkHit(int button, int updown, int x, int y)
                 return result;
 
             int w = _dlgW + x - _startX;
-            int h = _dlgH + y - _startY;
+            int h = _dlgH + _startY - y;
 
             GUIInfo *info = (GUIInfo *)getUserData();
             if (info && info->node) {
-                int y = _dlgY; // + _dlgH - h;
                 int pw, ph;
                 LayoutWidget wid(info->node);
                 wid.calcPrefSize(&pw, &ph);
@@ -238,6 +237,7 @@ int fgPopup::checkHit(int button, int updown, int x, int y)
                     w = pw;
                 if (h < ph)
                     h = ph;
+                int y = _dlgY + _dlgH - h;
 
                 // first child is always the dialog background puFrame
                 getFirstChild()->setSize(w, h);