From 115f99dec941791e277e9229ca93b7bcea45be78 Mon Sep 17 00:00:00 2001 From: ExMix Date: Thu, 26 Sep 2013 13:14:10 +0300 Subject: [PATCH] [core] fix maximum text length calculation --- gui/balloon.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gui/balloon.cpp b/gui/balloon.cpp index a6ccca91e6..4441c88a90 100644 --- a/gui/balloon.cpp +++ b/gui/balloon.cpp @@ -17,7 +17,7 @@ namespace gui static const int TopShadowMargin = 2; static const int BottomShadowMargin = 4; static const int LeftTextMargin = 1; - static const int RightTextMargin = 25; + static const int RightTextMargin = 3; static const int ArrowMargin = 16; } @@ -439,8 +439,8 @@ namespace gui double k = visualScale(); double textMargin = m_borderLImg.m_size.x + LeftTextMargin * k + RightTextMargin * k; - - double imageWidth = m_borderRImg.m_size.x; + + double imageWidth = m_borderRImg.m_size.x + m_imageView->roughBoundRect().SizeX(); unsigned maxTextWidth = ceil(m_maxWidth - (textMargin + imageWidth)); m_mainTextView->setMaxWidth(maxTextWidth); m_auxTextView->setMaxWidth(maxTextWidth);