summaryrefslogtreecommitdiff
path: root/src/gui/skin.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-12-31 20:29:03 +0300
committerAndrei Karas <akaras@inbox.ru>2015-12-31 20:29:03 +0300
commit7d987d35caf7a90b7ed0ffc942297ddc68c3da07 (patch)
tree90213329fe89653f92cbcfc20f550265e57c481d /src/gui/skin.cpp
parent8240be727f8d9ab3891dd750d67c68d5e9c38378 (diff)
downloadmanaplus-7d987d35caf7a90b7ed0ffc942297ddc68c3da07.tar.gz
manaplus-7d987d35caf7a90b7ed0ffc942297ddc68c3da07.tar.bz2
manaplus-7d987d35caf7a90b7ed0ffc942297ddc68c3da07.tar.xz
manaplus-7d987d35caf7a90b7ed0ffc942297ddc68c3da07.zip
Move ImagePosition enum into enums directory.
Diffstat (limited to 'src/gui/skin.cpp')
-rw-r--r--src/gui/skin.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/gui/skin.cpp b/src/gui/skin.cpp
index 602d7204e..2028cbfc0 100644
--- a/src/gui/skin.cpp
+++ b/src/gui/skin.cpp
@@ -26,6 +26,8 @@
#include "settings.h"
+#include "enums/resources/imageposition.h"
+
#include "resources/image.h"
#include "resources/imagerect.h"
@@ -124,24 +126,26 @@ void Skin::updateAlpha(const float minimumOpacityAllowed)
int Skin::getMinWidth() const
{
- if (!mBorder || !mBorder->grid[ImageRect::UPPER_LEFT]
- || !mBorder->grid[ImageRect::UPPER_RIGHT])
+ if (!mBorder ||
+ !mBorder->grid[ImagePosition::UPPER_LEFT] ||
+ !mBorder->grid[ImagePosition::UPPER_RIGHT])
{
return 1;
}
- return mBorder->grid[ImageRect::UPPER_LEFT]->getWidth() +
- mBorder->grid[ImageRect::UPPER_RIGHT]->getWidth();
+ return mBorder->grid[ImagePosition::UPPER_LEFT]->getWidth() +
+ mBorder->grid[ImagePosition::UPPER_RIGHT]->getWidth();
}
int Skin::getMinHeight() const
{
- if (!mBorder || !mBorder->grid[ImageRect::UPPER_LEFT]
- || !mBorder->grid[ImageRect::LOWER_LEFT])
+ if (!mBorder ||
+ !mBorder->grid[ImagePosition::UPPER_LEFT] ||
+ !mBorder->grid[ImagePosition::LOWER_LEFT])
{
return 1;
}
- return mBorder->grid[ImageRect::UPPER_LEFT]->getHeight() +
- mBorder->grid[ImageRect::LOWER_LEFT]->getHeight();
+ return mBorder->grid[ImagePosition::UPPER_LEFT]->getHeight() +
+ mBorder->grid[ImagePosition::LOWER_LEFT]->getHeight();
}