From 79114bbfe4bddf95345c33505a750f3aa80f1c56 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 16 Dec 2013 20:24:01 +0300 Subject: fix compilation warnings. --- src/gui/popups/speechbubble.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/gui/popups') diff --git a/src/gui/popups/speechbubble.cpp b/src/gui/popups/speechbubble.cpp index 7febfdf4c..0c40676f6 100644 --- a/src/gui/popups/speechbubble.cpp +++ b/src/gui/popups/speechbubble.cpp @@ -74,22 +74,18 @@ void SpeechBubble::setText(const std::string &text, const bool showName) mSpeechBox->setForegroundColorAll(getThemeColor(Theme::BUBBLE_TEXT), getThemeColor(Theme::BUBBLE_TEXT_OUTLINE)); - const int pad = mPadding; int width = mCaption->getWidth(); mSpeechBox->clearRows(); mSpeechBox->addRow(text); mSpeechBox->setWidth(mSpeechBox->getDataWidth()); - const int speechWidth = mSpeechBox->getWidth(); - const int fontHeight = getFont()->getHeight(); + const int speechWidth = mSpeechBox->getWidth(); const int nameHeight = showName ? mCaption->getHeight() + mSpacing : 0; - int height = fontHeight + nameHeight; if (width < speechWidth) width = speechWidth; - setContentSize(width, height); - + setContentSize(width, getFont()->getHeight() + nameHeight); mCaption->setPosition(0, 0); mSpeechBox->setPosition(0, nameHeight); } -- cgit v1.2.3-60-g2f50