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/tradewindow.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/gui/tradewindow.cpp') 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); -- cgit v1.2.3-60-g2f50