From: mfranz Date: Sat, 10 Jan 2009 23:43:32 +0000 (+0000) Subject: resize in SE direction (draggable borders planned) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=014f366369fa09d10c816853918c6bacf322e728;p=flightgear.git resize in SE direction (draggable borders planned) --- diff --git a/src/GUI/dialog.cxx b/src/GUI/dialog.cxx index dad53b3dd..8ae6d2ebd 100644 --- a/src/GUI/dialog.cxx +++ b/src/GUI/dialog.cxx @@ -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);