From 64192ec89b46f7c34aaaae493e48352c3cbbf03f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 19 Jun 2017 21:03:42 +0300 Subject: Use staticbrowserbox in speechbubble. --- src/gui/popups/speechbubble.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/gui/popups/speechbubble.cpp') diff --git a/src/gui/popups/speechbubble.cpp b/src/gui/popups/speechbubble.cpp index 50d54e692..382d3c93c 100644 --- a/src/gui/popups/speechbubble.cpp +++ b/src/gui/popups/speechbubble.cpp @@ -29,8 +29,8 @@ #include "gui/fonts/font.h" -#include "gui/widgets/browserbox.h" #include "gui/widgets/label.h" +#include "gui/widgets/staticbrowserbox.h" #include "debug.h" @@ -39,7 +39,7 @@ SpeechBubble::SpeechBubble() : mText(), mSpacing(mSkin != nullptr ? mSkin->getOption("spacing") : 2), mCaption(new Label(this)), - mSpeechBox(new BrowserBox(this, BrowserBoxMode::AUTO_SIZE, Opaque_true, + mSpeechBox(new StaticBrowserBox(this, Opaque_true, "speechbrowserbox.xml")) { setContentSize(140, 46); @@ -80,6 +80,7 @@ void SpeechBubble::setText(const std::string &text, const bool showName) mSpeechBox->clearRows(); mSpeechBox->addRow(text); mSpeechBox->setWidth(mSpeechBox->getDataWidth()); + mSpeechBox->updateHeight(); const int speechWidth = mSpeechBox->getWidth(); const int nameHeight = showName ? mCaption->getHeight() + mSpacing : 0; -- cgit v1.2.3-60-g2f50