From ad0c5a085c3c6531db2a84a77d590311ed1d2d8f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 22 Oct 2012 02:39:05 +0300 Subject: Add auto resize feature to equipment window for correct placing slots. --- src/gui/widgets/window.cpp | 8 ++++---- src/gui/widgets/window.h | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src/gui/widgets') diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp index 3f54ce3cc..9128402ad 100644 --- a/src/gui/widgets/window.cpp +++ b/src/gui/widgets/window.cpp @@ -50,6 +50,10 @@ Window::Window(const std::string &caption, const bool modal, Widget2(), gcn::WidgetListener(), mSkin(nullptr), + mDefaultX(0), + mDefaultY(0), + mDefaultWidth(0), + mDefaultHeight(0), mGrip(nullptr), mParent(parent), mLayout(nullptr), @@ -66,10 +70,6 @@ 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), diff --git a/src/gui/widgets/window.h b/src/gui/widgets/window.h index e758a4d99..73cd1c2be 100644 --- a/src/gui/widgets/window.h +++ b/src/gui/widgets/window.h @@ -428,6 +428,10 @@ class Window : public gcn::Window, { return mTitlePadding; } Skin *mSkin; /**< Skin in use by this window */ + int mDefaultX; /**< Default window X position */ + int mDefaultY; /**< Default window Y position */ + int mDefaultWidth; /**< Default window width */ + int mDefaultHeight; /**< Default window height */ private: enum ResizeHandles @@ -474,10 +478,6 @@ class Window : public gcn::Window, int mMinWinHeight; /**< Minimum window height */ int mMaxWinWidth; /**< Maximum window width */ int mMaxWinHeight; /**< Maximum window height */ - int mDefaultX; /**< Default window X position */ - int mDefaultY; /**< Default window Y position */ - int mDefaultWidth; /**< Default window width */ - int mDefaultHeight; /**< Default window height */ static int mouseResize; /**< Active resize handles */ static int instances; /**< Number of Window instances */ -- cgit v1.2.3-60-g2f50