summaryrefslogtreecommitdiff
path: root/src/gui/tradewindow.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/tradewindow.cpp
parenta39f63cdfa5ce15b22f294a8bb1db3a036ce462d (diff)
downloadmanaverse-761682b6254a3d43e65ff45e07683c61afa6f1e4.tar.gz
manaverse-761682b6254a3d43e65ff45e07683c61afa6f1e4.tar.bz2
manaverse-761682b6254a3d43e65ff45e07683c61afa6f1e4.tar.xz
manaverse-761682b6254a3d43e65ff45e07683c61afa6f1e4.zip
Last part of fixes.
Diffstat (limited to 'src/gui/tradewindow.cpp')
-rw-r--r--src/gui/tradewindow.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gui/tradewindow.cpp b/src/gui/tradewindow.cpp
index 43393fc09..8f85f677f 100644
--- a/src/gui/tradewindow.cpp
+++ b/src/gui/tradewindow.cpp
@@ -89,10 +89,11 @@ TradeWindow::TradeWindow():
mAddButton = new Button(_("Add"), "add", this);
mOkButton = new Button("", "", this); // Will be filled in later
- int width = std::max(mOkButton->getFont()->getWidth(CAPTION_PROPOSE),
- mOkButton->getFont()->getWidth(CAPTION_CONFIRMED));
- width = std::max(width, mOkButton->getFont()->getWidth(CAPTION_ACCEPT));
- width = std::max(width, mOkButton->getFont()->getWidth(CAPTION_ACCEPTED));
+ gcn::Font *fnt = mOkButton->getFont();
+ int width = std::max(fnt->getWidth(CAPTION_PROPOSE),
+ fnt->getWidth(CAPTION_CONFIRMED));
+ width = std::max(width, fnt->getWidth(CAPTION_ACCEPT));
+ width = std::max(width, fnt->getWidth(CAPTION_ACCEPTED));
mOkButton->setWidth(8 + width);