From 209fdbeaf69176fdab23604e820a73103e66776d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 1 May 2013 23:13:02 +0300 Subject: Fix tilebar padding with different font sizes. Fix paddings in outfits window. --- src/gui/widgets/window.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/gui/widgets/window.cpp') 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(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"); } -- cgit v1.2.3-70-g09d2