summaryrefslogtreecommitdiff
path: root/src/gui/speechbubble.cpp
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2009-03-11 18:28:40 -0600
committerIra Rice <irarice@gmail.com>2009-03-11 18:28:40 -0600
commit951fc647b291b38a3e4652b326ed4c4867c7ec0b (patch)
treee9fa564ff81dddf24de216bcc650a47fd6fc22be /src/gui/speechbubble.cpp
parent0d50333f996a4d5c4bb28032e52a3c57f31805b6 (diff)
downloadmana-951fc647b291b38a3e4652b326ed4c4867c7ec0b.tar.gz
mana-951fc647b291b38a3e4652b326ed4c4867c7ec0b.tar.bz2
mana-951fc647b291b38a3e4652b326ed4c4867c7ec0b.tar.xz
mana-951fc647b291b38a3e4652b326ed4c4867c7ec0b.zip
Fixed up speech bubbles slightly so that it respects different padding
values. Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/gui/speechbubble.cpp')
-rw-r--r--src/gui/speechbubble.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/speechbubble.cpp b/src/gui/speechbubble.cpp
index 0b18209e..d342328e 100644
--- a/src/gui/speechbubble.cpp
+++ b/src/gui/speechbubble.cpp
@@ -79,7 +79,7 @@ void SpeechBubble::setText(std::string text, bool showName)
const int fontHeight = getFont()->getHeight();
const int numRows = showName ? mSpeechBox->getNumberOfRows() + 1 :
mSpeechBox->getNumberOfRows();
- int yPos = showName ? fontHeight + 3 : 3;
+ int yPos = showName ? fontHeight + getPadding() : getPadding();
int height = (numRows * fontHeight);
if (width < mSpeechBox->getMinWidth())
@@ -87,11 +87,11 @@ void SpeechBubble::setText(std::string text, bool showName)
if (numRows == 1)
{
- yPos = (fontHeight / 4) + 3;
+ yPos = (fontHeight / 4) + getPadding();
height = ((3 * fontHeight) / 2) + 1;
}
- setContentSize(width + fontHeight, height + 6);
+ setContentSize(width + fontHeight, height + getPadding());
mSpeechArea->setDimension(gcn::Rectangle(4, yPos, width + 5, height));
}