summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/dropshortcutcontainer.cpp4
-rw-r--r--src/gui/widgets/icon.cpp10
-rw-r--r--src/gui/widgets/itemshortcutcontainer.cpp4
-rw-r--r--src/gui/widgets/resizegrip.cpp4
4 files changed, 11 insertions, 11 deletions
diff --git a/src/gui/widgets/dropshortcutcontainer.cpp b/src/gui/widgets/dropshortcutcontainer.cpp
index fd920ffa4..7fec6bf44 100644
--- a/src/gui/widgets/dropshortcutcontainer.cpp
+++ b/src/gui/widgets/dropshortcutcontainer.cpp
@@ -156,8 +156,8 @@ void DropShortcutContainer::draw(gcn::Graphics *graphics)
Image* image = mItemMoved->getImage();
if (image)
{
- const int tPosX = mCursorPosX - (image->getWidth() / 2);
- const int tPosY = mCursorPosY - (image->getHeight() / 2);
+ const int tPosX = mCursorPosX - (image->mBounds.w / 2);
+ const int tPosY = mCursorPosY - (image->mBounds.h / 2);
g->drawImage(image, tPosX, tPosY);
g->drawText(toString(mItemMoved->getQuantity()),
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);
}
}
diff --git a/src/gui/widgets/itemshortcutcontainer.cpp b/src/gui/widgets/itemshortcutcontainer.cpp
index b33c7ee26..ab089ca45 100644
--- a/src/gui/widgets/itemshortcutcontainer.cpp
+++ b/src/gui/widgets/itemshortcutcontainer.cpp
@@ -196,8 +196,8 @@ void ItemShortcutContainer::draw(gcn::Graphics *graphics)
Image* image = mItemMoved->getImage();
if (image)
{
- const int tPosX = mCursorPosX - (image->getWidth() / 2);
- const int tPosY = mCursorPosY - (image->getHeight() / 2);
+ const int tPosX = mCursorPosX - (image->mBounds.w / 2);
+ const int tPosY = mCursorPosY - (image->mBounds.h / 2);
g->drawImage(image, tPosX, tPosY);
g->drawText(toString(mItemMoved->getQuantity()),
diff --git a/src/gui/widgets/resizegrip.cpp b/src/gui/widgets/resizegrip.cpp
index f477e51a8..861dde29e 100644
--- a/src/gui/widgets/resizegrip.cpp
+++ b/src/gui/widgets/resizegrip.cpp
@@ -52,8 +52,8 @@ ResizeGrip::ResizeGrip(const std::string &image)
if (gripImage)
{
- setWidth(gripImage->getWidth() + 2);
- setHeight(gripImage->getHeight() + 2);
+ setWidth(gripImage->mBounds.w + 2);
+ setHeight(gripImage->mBounds.h + 2);
}
else
{