summaryrefslogtreecommitdiff
path: root/src/gui/speechbubble.cpp
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2009-04-20 21:41:17 +0200
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-04-20 21:41:17 +0200
commit0689ecac058ce1ef063b0250c48a39ed1db11f82 (patch)
tree24107360261ae3431e06a33fa6951b4516690d6b /src/gui/speechbubble.cpp
parent8f1421e791ac6cbb7af3bde69f1b44e0f8fd080d (diff)
downloadmana-client-0689ecac058ce1ef063b0250c48a39ed1db11f82.tar.gz
mana-client-0689ecac058ce1ef063b0250c48a39ed1db11f82.tar.bz2
mana-client-0689ecac058ce1ef063b0250c48a39ed1db11f82.tar.xz
mana-client-0689ecac058ce1ef063b0250c48a39ed1db11f82.zip
Fixed a fairly obscure text wrapping bug.
Signed-off-by: Tametomo <irarice@gmail.com> Signed-off-by: Bjørn Lindeijer <bjorn@lindeijer.nl>
Diffstat (limited to 'src/gui/speechbubble.cpp')
-rw-r--r--src/gui/speechbubble.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/speechbubble.cpp b/src/gui/speechbubble.cpp
index 0cfa543c..959e47ee 100644
--- a/src/gui/speechbubble.cpp
+++ b/src/gui/speechbubble.cpp
@@ -69,8 +69,8 @@ void SpeechBubble::setText(const std::string &text, bool showName)
mSpeechBox->setTextColor(&guiPalette->getColor(Palette::TEXT));
int width = mCaption->getWidth() + 2 * getPadding();
- const int speechWidth = mSpeechBox->getMinWidth() + 2 * getPadding();
mSpeechBox->setTextWrapped(text, 130 > width ? 130 : width);
+ const int speechWidth = mSpeechBox->getMinWidth() + 2 * getPadding();
const int fontHeight = getFont()->getHeight();
const int nameHeight = showName ? mCaption->getHeight() +