diff options
author | Ira Rice <irarice@gmail.com> | 2009-01-28 18:03:14 -0700 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-01-28 18:03:14 -0700 |
commit | 129245a8063f09775930b0ffff11f043c219c277 (patch) | |
tree | e7a1486251f149cfd14c3eb290f4113107427bee /src/gui/speechbubble.cpp | |
parent | 4418d3678337276070e6d46d8011ce052be388a5 (diff) | |
download | mana-129245a8063f09775930b0ffff11f043c219c277.tar.gz mana-129245a8063f09775930b0ffff11f043c219c277.tar.bz2 mana-129245a8063f09775930b0ffff11f043c219c277.tar.xz mana-129245a8063f09775930b0ffff11f043c219c277.zip |
Consolidated setMinWidth into textWrap, since all lines are dependant
upon knowing what dimension they have to wrap to or beat in order for
text wrapping to work. By adding this to be initiated at the same time
as the text wrapping is done, this should decrease visual artifacts
caused by not initializing it properly to begin with.
Also made the item popups compact to the minimum dimension.
Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/gui/speechbubble.cpp')
-rw-r--r-- | src/gui/speechbubble.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/gui/speechbubble.cpp b/src/gui/speechbubble.cpp index a6bb5563..7eedce1c 100644 --- a/src/gui/speechbubble.cpp +++ b/src/gui/speechbubble.cpp @@ -65,8 +65,6 @@ SpeechBubble::SpeechBubble(): // LEEOR / TODO: This causes an exception error. //moveToBottom(getParent()); - - mSpeechBox->setTextWrapped( "" ); } void SpeechBubble::setCaption(const std::string &name, const gcn::Color &color) @@ -78,8 +76,7 @@ void SpeechBubble::setCaption(const std::string &name, const gcn::Color &color) void SpeechBubble::setText(std::string mText) { - mSpeechBox->setMinWidth(140); - mSpeechBox->setTextWrapped(mText); + mSpeechBox->setTextWrapped(mText, 130); const int fontHeight = getFont()->getHeight(); const int numRows = mSpeechBox->getNumberOfRows() + 1; |