From 826b56cabce60b1a4fbf6e936966dc9838cf753e Mon Sep 17 00:00:00 2001 From: Andrei Shkrob Date: Mon, 11 Aug 2025 20:48:13 +0200 Subject: [PATCH] [drape] Fix gui text alignment Signed-off-by: Andrei Shkrob --- libs/drape_frontend/gui/gui_text.cpp | 40 +++++++++++++++++++--------- 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/libs/drape_frontend/gui/gui_text.cpp b/libs/drape_frontend/gui/gui_text.cpp index a71c4e93a..adcc660e9 100644 --- a/libs/drape_frontend/gui/gui_text.cpp +++ b/libs/drape_frontend/gui/gui_text.cpp @@ -370,7 +370,10 @@ void MutableLabel::SetText(LabelResult & result, std::string text, ref_ptr::max(), std::numeric_limits::lowest()}; + float offsetLeft = 0; + glsl::vec2 pen = glsl::vec2(0.0, 0.0); ASSERT_EQUAL(m_glyphRegions.size(), m_shapedText.m_glyphs.size(), ()); @@ -384,17 +387,30 @@ void MutableLabel::SetText(LabelResult & result, std::string text, ref_ptr textures) - : TBase(id, anchor, pivot) - , m_textView(make_unique_dp(anchor)) - , m_isContentDirty(true) - , m_textureManager(std::move(textures)) - , m_glyphsReady(false) -{} + : MutableLabelHandle(id, anchor, pivot) +{ + m_textureManager = std::move(textures); +} void MutableLabelHandle::GetAttributeMutation(ref_ptr mutator) const {