summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/window.cpp5
-rw-r--r--src/gui/widgets/window.h2
2 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp
index f11db3be3..8733bb737 100644
--- a/src/gui/widgets/window.cpp
+++ b/src/gui/widgets/window.cpp
@@ -128,7 +128,8 @@ Window::Window(const std::string &caption, const bool modal,
mCaptionOffsetY = getOption("captionoffsety");
if (!mCaptionOffsetY)
mCaptionOffsetY = 5;
- mCaptionAlign = getOption("captionalign");
+ mCaptionAlign = static_cast<gcn::Graphics::Alignment>(
+ getOption("captionalign"));
if (mCaptionAlign < gcn::Graphics::LEFT
|| mCaptionAlign > gcn::Graphics::RIGHT)
{
@@ -289,7 +290,7 @@ void Window::draw(gcn::Graphics *graphics)
{
g->setColorAll(mForegroundColor, mForegroundColor2);
int x;
- switch (static_cast<gcn::Graphics::Alignment>(mCaptionAlign))
+ switch (mCaptionAlign)
{
case Graphics::LEFT:
default:
diff --git a/src/gui/widgets/window.h b/src/gui/widgets/window.h
index 40270673a..79d7053b0 100644
--- a/src/gui/widgets/window.h
+++ b/src/gui/widgets/window.h
@@ -494,7 +494,7 @@ class Window : public gcn::Window,
ImageCollection *mVertexes;
int mCaptionOffsetX;
int mCaptionOffsetY;
- int mCaptionAlign;
+ gcn::Graphics::Alignment mCaptionAlign;
int mTitlePadding;
int mGripPadding;
int mResizeHandles;