Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorExMix <rahuba.youri@mapswithme.com>2013-09-26 14:14:10 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:02:47 +0300
commit115f99dec941791e277e9229ca93b7bcea45be78 (patch)
tree0f0247763378da5b8528b62587c2580ae3d9fde1 /gui
parent7b3ca438bf50c966b66ac7305547b57b990d816f (diff)
[core] fix maximum text length calculation
Diffstat (limited to 'gui')
-rw-r--r--gui/balloon.cpp6
1 files 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);