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
diff options
context:
space:
mode:
authorAnatoliy Tomilov <tomilovanatoliy@gmail.com>2020-08-25 12:58:06 +0300
committerMaksim Andrianov <maksimandrianov1@gmail.com>2020-09-14 13:36:46 +0300
commita8d79afbe0ffcd89a47f61e67f270eaee4b1f5ba (patch)
treeec2881d6b436a34c5af3b15e2ea27cb5ea839bcf /drape_frontend/user_mark_shapes.cpp
parentdd59773afc0a2798f7154bdc22122dd5ba3eb32c (diff)
[drape] [Booking] Correct calculations of text metrics for badge width adjustment MAPSME-14628
Diffstat (limited to 'drape_frontend/user_mark_shapes.cpp')
-rw-r--r--drape_frontend/user_mark_shapes.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/drape_frontend/user_mark_shapes.cpp b/drape_frontend/user_mark_shapes.cpp
index d5be528127..9ce4c4187c 100644
--- a/drape_frontend/user_mark_shapes.cpp
+++ b/drape_frontend/user_mark_shapes.cpp
@@ -263,9 +263,10 @@ void GeneratePoiSymbolShape(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::Te
textures->GetSymbolRegion(symbolName, region);
float const pixelHalfWidth = 0.5f * region.GetPixelSize().x;
+ auto const vs = static_cast<float>(df::VisualParams::Instance().GetVisualScale());
float constexpr kBadgeMarginsAdjustmentFactor = 4.0f;
float const badgeMarginsAdjustment =
- kBadgeMarginsAdjustmentFactor * titleDecl.m_primaryOffset.x;
+ kBadgeMarginsAdjustmentFactor * titleDecl.m_primaryOffset.x * vs;
params.m_pixelWidth = 3.0f * pixelHalfWidth + textWidth + badgeMarginsAdjustment;
params.m_offset.x += 0.5f * (pixelHalfWidth + textWidth + badgeMarginsAdjustment);