summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/window.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp
index 0619a85a9..ad8014ee8 100644
--- a/src/gui/widgets/window.cpp
+++ b/src/gui/widgets/window.cpp
@@ -116,8 +116,7 @@ Window::Window(const std::string &caption, const bool modal,
setPadding(mSkin->getPadding());
if (getOptionBool("titlebarBold"))
mCaptionFont = reinterpret_cast<gcn::Font*>(boldFont);
- setTitlePadding(mSkin->getTitlePadding());
- setTitleBarHeight(getOption("titlebarHeight"));
+ mTitlePadding = mSkin->getTitlePadding();
mGripPadding = getOption("resizePadding");
mCaptionOffsetX = getOption("captionoffsetx");
if (!mCaptionOffsetX)
@@ -131,6 +130,10 @@ Window::Window(const std::string &caption, const bool modal,
{
mCaptionAlign = gcn::Graphics::LEFT;
}
+ setTitleBarHeight(getOption("titlebarHeight"));
+ if (!mTitleBarHeight)
+ mTitleBarHeight = mCaptionFont->getHeight();
+
setPalette(getOption("palette"));
childPalette = getOption("childPalette");
}