diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-12-16 19:51:22 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-12-16 20:05:42 +0300 |
commit | 7f7ac0e998506fb2b19b03ae4f2ef6ef04b87b13 (patch) | |
tree | ff445411d6b69e6f65f7f83bf7ff634974f472c6 /src/gui/widgets/browserbox.cpp | |
parent | bf3205aafa71fad7138e7be8a4b641907ec056ce (diff) | |
download | manaplus-7f7ac0e998506fb2b19b03ae4f2ef6ef04b87b13.tar.gz manaplus-7f7ac0e998506fb2b19b03ae4f2ef6ef04b87b13.tar.bz2 manaplus-7f7ac0e998506fb2b19b03ae4f2ef6ef04b87b13.tar.xz manaplus-7f7ac0e998506fb2b19b03ae4f2ef6ef04b87b13.zip |
fix speechbubble size.
Diffstat (limited to 'src/gui/widgets/browserbox.cpp')
-rw-r--r-- | src/gui/widgets/browserbox.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp index 014e4cf58..d3e2efc67 100644 --- a/src/gui/widgets/browserbox.cpp +++ b/src/gui/widgets/browserbox.cpp @@ -72,6 +72,7 @@ BrowserBox::BrowserBox(const Widget2 *const widget, mPadding(0), mNewLinePadding(15), mItemPadding(0), + mDataWidth(0), mHighlightColor(getThemeColor(Theme::HIGHLIGHT)), mHyperLinkColor(getThemeColor(Theme::HYPERLINK)), mOpaque(opaque), @@ -403,6 +404,7 @@ void BrowserBox::clearRows() setHeight(0); mSelectedLink = -1; mUpdateTime = 0; + mDataWidth = 0; updateHeight(); } @@ -751,7 +753,11 @@ int BrowserBox::calcHeight() start += 3; if (start == row.size()) + { + if (x > mDataWidth) + mDataWidth = x; break; + } } } const size_t len = (end == std::string::npos) ? end : end - start; @@ -832,6 +838,8 @@ int BrowserBox::calcHeight() break; x += width; + if (x > mDataWidth) + mDataWidth = x; } y += fontHeight; } |