From 761682b6254a3d43e65ff45e07683c61afa6f1e4 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 31 Mar 2012 16:54:22 +0300 Subject: Last part of fixes. --- src/gui/npcdialog.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/gui/npcdialog.cpp') diff --git a/src/gui/npcdialog.cpp b/src/gui/npcdialog.cpp index 12b3e1244..39af0c71d 100644 --- a/src/gui/npcdialog.cpp +++ b/src/gui/npcdialog.cpp @@ -118,10 +118,11 @@ NpcDialog::NpcDialog(int npcId) : mPlusButton = new Button(_("+"), "inc", this); mMinusButton = new Button(_("-"), "dec", this); - int width = std::max(mButton->getFont()->getWidth(CAPTION_WAITING), - mButton->getFont()->getWidth(CAPTION_NEXT)); - width = std::max(width, mButton->getFont()->getWidth(CAPTION_CLOSE)); - width = std::max(width, mButton->getFont()->getWidth(CAPTION_SUBMIT)); + gcn::Font *fnt = mButton->getFont(); + int width = std::max(fnt->getWidth(CAPTION_WAITING), + fnt->getWidth(CAPTION_NEXT)); + width = std::max(width, fnt->getWidth(CAPTION_CLOSE)); + width = std::max(width, fnt->getWidth(CAPTION_SUBMIT)); mButton->setWidth(8 + width); -- cgit v1.2.3-60-g2f50