summaryrefslogtreecommitdiff
path: root/src/gui/widgets/icon.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/icon.cpp')
-rw-r--r--src/gui/widgets/icon.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/widgets/icon.cpp b/src/gui/widgets/icon.cpp
index 2799080b6..3e9c7dd24 100644
--- a/src/gui/widgets/icon.cpp
+++ b/src/gui/widgets/icon.cpp
@@ -34,21 +34,21 @@ Icon::Icon(const std::string &file)
{
mImage = ResourceManager::getInstance()->getImage(file);
if (mImage)
- setSize(mImage->getWidth(), mImage->getHeight());
+ setSize(mImage->mBounds.w, mImage->mBounds.h);
}
Icon::Icon(Image *image)
: mImage(image)
{
if (mImage)
- setSize(mImage->getWidth(), mImage->getHeight());
+ setSize(mImage->mBounds.w, mImage->mBounds.h);
}
void Icon::setImage(Image *image)
{
mImage = image;
if (mImage)
- setSize(mImage->getWidth(), mImage->getHeight());
+ setSize(mImage->mBounds.w, mImage->mBounds.h);
}
void Icon::draw(gcn::Graphics *g)
@@ -56,8 +56,8 @@ void Icon::draw(gcn::Graphics *g)
if (mImage)
{
Graphics *graphics = static_cast<Graphics*>(g);
- const int x = (getWidth() - mImage->getWidth()) / 2;
- const int y = (getHeight() - mImage->getHeight()) / 2;
+ const int x = (getWidth() - mImage->mBounds.w) / 2;
+ const int y = (getHeight() - mImage->mBounds.h) / 2;
graphics->drawImage(mImage, x, y);
}
}