summaryrefslogtreecommitdiff
path: root/src/gui/speechbubble.cpp
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2009-04-20 20:32:12 +0200
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-04-20 20:32:55 +0200
commitb926bec4ff23e43729e88ea36c3cba9509b66f7c (patch)
treea68850498d170640f57e2d0f74716b6a61f700c9 /src/gui/speechbubble.cpp
parenta1dbbdf1ca8560de8cff703d21c0063610261196 (diff)
downloadmana-b926bec4ff23e43729e88ea36c3cba9509b66f7c.tar.gz
mana-b926bec4ff23e43729e88ea36c3cba9509b66f7c.tar.bz2
mana-b926bec4ff23e43729e88ea36c3cba9509b66f7c.tar.xz
mana-b926bec4ff23e43729e88ea36c3cba9509b66f7c.zip
Reduced the weight of a few gui windows and popups which wrapped their
TextBoxes in ScrollAreas, but never needed to scroll (and disabled both the horizontal and vertical scrollbars, which makes using a scrollarea kind of pointless to begin with). Signed-off-by: Ira Rice <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.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/gui/speechbubble.cpp b/src/gui/speechbubble.cpp
index da472449..e95e83ca 100644
--- a/src/gui/speechbubble.cpp
+++ b/src/gui/speechbubble.cpp
@@ -24,7 +24,6 @@
#include "gui/gui.h"
-#include "gui/widgets/scrollarea.h"
#include "gui/widgets/textbox.h"
#include "graphics.h"
@@ -49,14 +48,8 @@ SpeechBubble::SpeechBubble():
mSpeechBox->setOpaque(false);
mSpeechBox->setTextColor(&guiPalette->getColor(Palette::CHAT));
- mSpeechArea = new ScrollArea(mSpeechBox);
-
- mSpeechArea->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
- mSpeechArea->setVerticalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
- mSpeechArea->setOpaque(false);
-
add(mCaption);
- add(mSpeechArea);
+ add(mSpeechBox);
loadPopupConfiguration();
}
@@ -96,5 +89,5 @@ void SpeechBubble::setText(const std::string &text, bool showName)
const int yPos = ((getHeight() - height) / 2) + nameHeight;
mCaption->setPosition(xPos, getPadding());
- mSpeechArea->setDimension(gcn::Rectangle(xPos, yPos, width, height));
+ mSpeechBox->setPosition(xPos, yPos);
}