From 66d469fe20cff2749316afe3ba44ad74acfc1557 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 4 Oct 2012 12:00:17 +0300 Subject: Fix popups sizes and padding. --- src/gui/spellpopup.cpp | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'src/gui/spellpopup.cpp') diff --git a/src/gui/spellpopup.cpp b/src/gui/spellpopup.cpp index 4d9666be4..f28cc024f 100644 --- a/src/gui/spellpopup.cpp +++ b/src/gui/spellpopup.cpp @@ -76,23 +76,13 @@ void SpellPopup::setItem(const TextCommand *const spell) if (mItemComment->getWidth() > minWidth) minWidth = mItemComment->getWidth(); - minWidth += 8; - setWidth(minWidth + 2 * getPadding()); - - mItemName->setPosition(getPadding(), getPadding()); - mItemComment->setPosition(getPadding(), - getPadding() + mItemName->getHeight()); + mItemName->setPosition(0, 0); + mItemComment->setPosition(0, mItemName->getHeight()); if (mItemComment->getCaption() != "") - { - setContentSize(minWidth, getPadding() - + 2 * getFont()->getHeight()); - } + setContentSize(minWidth, 2 * getFont()->getHeight()); else - { - setContentSize(minWidth, getPadding() - + getFont()->getHeight()); - } + setContentSize(minWidth, getFont()->getHeight()); } void SpellPopup::view(const int x, const int y) -- cgit v1.2.3-70-g09d2