Skip to content

Commit

Permalink
Fixed|libappfw|PopupWidget: Positioning a tall popup
Browse files Browse the repository at this point in the history
The bottom and the top edges weren't correctly aligned with regard
to margins.
  • Loading branch information
skyjake committed Aug 22, 2015
1 parent 56f1c28 commit 40675c4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions doomsday/sdk/libappfw/src/widgets/popupwidget.cpp
Expand Up @@ -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</small>
* http://www.gnu.org/licenses</small>
*/

#include "de/PopupWidget"
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -337,7 +338,7 @@ bool PopupWidget::handleEvent(Event const &event)
}
}
return true;
}
}

if(event.type() == Event::KeyPress ||
event.type() == Event::KeyRepeat ||
Expand Down

0 comments on commit 40675c4

Please sign in to comment.