diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/widgets/window.cpp | 4 | ||||
-rw-r--r-- | src/gui/widgets/window.h | 4 | ||||
-rw-r--r-- | src/gui/windows/confirmdialog.cpp | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp index 9de9b431f..1c63bba31 100644 --- a/src/gui/widgets/window.cpp +++ b/src/gui/widgets/window.cpp @@ -123,6 +123,8 @@ Window::Window(const std::string &caption, mDefaultY(0), mDefaultWidth(0), mDefaultHeight(0), + mCaptionOffsetX(7), + mCaptionOffsetY(5), mShowTitle(true), mLastRedraw(true), mGrip(nullptr), @@ -138,8 +140,6 @@ Window::Window(const std::string &caption, mMaxWinWidth(mainGraphics->mWidth), mMaxWinHeight(mainGraphics->mHeight), mVertexes(new ImageCollection), - mCaptionOffsetX(7), - mCaptionOffsetY(5), mCaptionAlign(Graphics::LEFT), mTitlePadding(4), mGripPadding(2), diff --git a/src/gui/widgets/window.h b/src/gui/widgets/window.h index 75f4b81fb..06a0d3295 100644 --- a/src/gui/widgets/window.h +++ b/src/gui/widgets/window.h @@ -643,6 +643,8 @@ class Window notfinal : public BasicContainer2, int mDefaultY; /**< Default window Y position */ int mDefaultWidth; /**< Default window width */ int mDefaultHeight; /**< Default window height */ + int mCaptionOffsetX; + int mCaptionOffsetY; bool mShowTitle; /**< Window has a title bar */ bool mLastRedraw; @@ -698,8 +700,6 @@ class Window notfinal : public BasicContainer2, */ static const unsigned resizeBorderWidth = 10; ImageCollection *mVertexes A_NONNULLPOINTER; - int mCaptionOffsetX; - int mCaptionOffsetY; Graphics::Alignment mCaptionAlign; int mTitlePadding; int mGripPadding; diff --git a/src/gui/windows/confirmdialog.cpp b/src/gui/windows/confirmdialog.cpp index e08177ef4..4a0936c0c 100644 --- a/src/gui/windows/confirmdialog.cpp +++ b/src/gui/windows/confirmdialog.cpp @@ -70,7 +70,7 @@ void ConfirmDialog::postInit() const int fontHeight = getFont()->getHeight(); const int height = numRows * fontHeight; - int width = getFont()->getWidth(getCaption()); + int width = getFont()->getWidth(getCaption()) + mCaptionOffsetX; if (width < mTextBox->getMinWidth()) width = mTextBox->getMinWidth(); |