From 40675c456410695c76801e1592f24661f83d2040 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaakko=20Kera=CC=88nen?= Date: Sat, 22 Aug 2015 23:39:38 +0300 Subject: [PATCH] Fixed|libappfw|PopupWidget: Positioning a tall popup The bottom and the top edges weren't correctly aligned with regard to margins. --- doomsday/sdk/libappfw/src/widgets/popupwidget.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doomsday/sdk/libappfw/src/widgets/popupwidget.cpp b/doomsday/sdk/libappfw/src/widgets/popupwidget.cpp index adfef86fe8..c4c453292f 100644 --- a/doomsday/sdk/libappfw/src/widgets/popupwidget.cpp +++ b/doomsday/sdk/libappfw/src/widgets/popupwidget.cpp @@ -13,7 +13,7 @@ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser * General Public License for more details. You should have received a copy of * the GNU Lesser General Public License along with this program; if not, see: - * http://www.gnu.org/licenses + * http://www.gnu.org/licenses */ #include "de/PopupWidget" @@ -101,7 +101,8 @@ DENG_GUI_PIMPL(PopupWidget) .setInput(Rule::Top, OperatorRule::clamped( *anchorY - self.rule().height() / 2, self.margins().top(), - self.root().viewHeight() - self.rule().height() - self.margins().bottom())); + self.root().viewHeight() - self.rule().height() - + self.margins().bottom() + self.margins().top())); break; case ui::Right: @@ -337,7 +338,7 @@ bool PopupWidget::handleEvent(Event const &event) } } return true; - } + } if(event.type() == Event::KeyPress || event.type() == Event::KeyRepeat ||