summaryrefslogtreecommitdiff
path: root/src/gui/widgets/window.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-09-07 22:09:11 +0300
committerAndrei Karas <akaras@inbox.ru>2012-09-07 22:09:11 +0300
commitb7e35a7bbd41c39fa675e77b2af6a11bb4d86dd2 (patch)
treeee27a5a1ace7e5dbc588466dc623013e4d5cea99 /src/gui/widgets/window.cpp
parent7d3059516fc25134d0d29b497e546f2846162399 (diff)
downloadmv-b7e35a7bbd41c39fa675e77b2af6a11bb4d86dd2.tar.gz
mv-b7e35a7bbd41c39fa675e77b2af6a11bb4d86dd2.tar.bz2
mv-b7e35a7bbd41c39fa675e77b2af6a11bb4d86dd2.tar.xz
mv-b7e35a7bbd41c39fa675e77b2af6a11bb4d86dd2.zip
Improve constructors in some classes.
Diffstat (limited to 'src/gui/widgets/window.cpp')
-rw-r--r--src/gui/widgets/window.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp
index 58247870f..f2266dfd1 100644
--- a/src/gui/widgets/window.cpp
+++ b/src/gui/widgets/window.cpp
@@ -46,8 +46,10 @@ int Window::instances = 0;
int Window::mouseResize = 0;
Window::Window(const std::string &caption, const bool modal,
- Window *const parent, std::string skin):
+ Window *const parent, std::string skin) :
gcn::Window(caption),
+ gcn::WidgetListener(),
+ mSkin(nullptr),
mGrip(nullptr),
mParent(parent),
mLayout(nullptr),
@@ -64,12 +66,17 @@ Window::Window(const std::string &caption, const bool modal,
mMinWinHeight(40),
mMaxWinWidth(mainGraphics->mWidth),
mMaxWinHeight(mainGraphics->mHeight),
+ mDefaultX(0),
+ mDefaultY(0),
+ mDefaultWidth(0),
+ mDefaultHeight(0),
mVertexes(new GraphicsVertexes()),
mCaptionOffsetX(7),
mCaptionOffsetY(5),
mCaptionAlign(gcn::Graphics::LEFT),
mTitlePadding(4),
- mRedraw(true)
+ mRedraw(true),
+ mCaptionFont(getFont())
{
logger->log("Window::Window(\"%s\")", caption.c_str());
@@ -108,10 +115,6 @@ Window::Window(const std::string &caption, const bool modal,
}
}
}
- else
- {
- mSkin = nullptr;
- }
// Add this window to the window container
windowContainer->add(this);
@@ -126,7 +129,6 @@ Window::Window(const std::string &caption, const bool modal,
setVisible(false);
addWidgetListener(this);
- mCaptionFont = getFont();
setForegroundColor(Theme::getThemeColor(Theme::WINDOW));
}