summaryrefslogtreecommitdiff
path: root/src/gui/npcdialog.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-03-31 16:54:22 +0300
committerAndrei Karas <akaras@inbox.ru>2012-04-01 03:56:16 +0300
commit761682b6254a3d43e65ff45e07683c61afa6f1e4 (patch)
tree2ee462840f3aadb1e96bfa5c6784ec2cc0d2861a /src/gui/npcdialog.cpp
parenta39f63cdfa5ce15b22f294a8bb1db3a036ce462d (diff)
downloadplus-761682b6254a3d43e65ff45e07683c61afa6f1e4.tar.gz
plus-761682b6254a3d43e65ff45e07683c61afa6f1e4.tar.bz2
plus-761682b6254a3d43e65ff45e07683c61afa6f1e4.tar.xz
plus-761682b6254a3d43e65ff45e07683c61afa6f1e4.zip
Last part of fixes.
Diffstat (limited to 'src/gui/npcdialog.cpp')
-rw-r--r--src/gui/npcdialog.cpp9
1 files changed, 5 insertions, 4 deletions
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);