summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-10-05 14:59:54 +0300
committerAndrei Karas <akaras@inbox.ru>2013-10-05 14:59:54 +0300
commitf23f96aaf3e4fbfa44645a69ca57748a5570f70c (patch)
treef9c2b8883ae182caeccd5b5c87ce45815218093d /src/gui/widgets
parent90dd756673b47eed42e0941838033ba9fae59e1c (diff)
downloadmv-f23f96aaf3e4fbfa44645a69ca57748a5570f70c.tar.gz
mv-f23f96aaf3e4fbfa44645a69ca57748a5570f70c.tar.bz2
mv-f23f96aaf3e4fbfa44645a69ca57748a5570f70c.tar.xz
mv-f23f96aaf3e4fbfa44645a69ca57748a5570f70c.zip
Fix incorrect ShopListBox height.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/shoplistbox.cpp7
-rw-r--r--src/gui/widgets/shoplistbox.h2
2 files changed, 7 insertions, 2 deletions
diff --git a/src/gui/widgets/shoplistbox.cpp b/src/gui/widgets/shoplistbox.cpp
index 53e5f25e3..263a94d95 100644
--- a/src/gui/widgets/shoplistbox.cpp
+++ b/src/gui/widgets/shoplistbox.cpp
@@ -176,8 +176,13 @@ void ShopListBox::draw(gcn::Graphics *gcnGraphics)
void ShopListBox::adjustSize()
{
+ BLOCK_START("ShopListBox::adjustSize")
if (mListModel)
- setHeight(mRowHeight * mListModel->getNumberOfElements());
+ {
+ setHeight(mRowHeight * mListModel->getNumberOfElements()
+ + 2 * mPadding);
+ }
+ BLOCK_END("ShopListBox::adjustSize")
}
void ShopListBox::setPriceCheck(const bool check)
diff --git a/src/gui/widgets/shoplistbox.h b/src/gui/widgets/shoplistbox.h
index b5fc7c896..15aff3211 100644
--- a/src/gui/widgets/shoplistbox.h
+++ b/src/gui/widgets/shoplistbox.h
@@ -72,7 +72,7 @@ class ShopListBox final : public ListBox
/**
* Adjust List draw size
*/
- void adjustSize();
+ void adjustSize() override;
/**
* Set on/off the disabling of too expensive items.