From f3fa961af5d5e567a7b1e2b6592000d9c4cf5f87 Mon Sep 17 00:00:00 2001 From: CastagnaIT Date: Mon, 18 Dec 2023 10:43:21 +0100 Subject: [PATCH] [guilib][GUIFadeLabelControl] Fix text right alignment --- xbmc/guilib/GUIFadeLabelControl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xbmc/guilib/GUIFadeLabelControl.cpp b/xbmc/guilib/GUIFadeLabelControl.cpp index 5855f3c438..fb6a683cab 100644 --- a/xbmc/guilib/GUIFadeLabelControl.cpp +++ b/xbmc/guilib/GUIFadeLabelControl.cpp @@ -185,7 +185,7 @@ void CGUIFadeLabelControl::Render() if (m_label.align & XBFONT_CENTER_X) posX = m_posX + m_width * 0.5f; else if (m_label.align & XBFONT_RIGHT) - posX = m_posX + m_width; + posX = m_posX + m_width - m_textLayout.GetTextWidth(); m_textLayout.Render(posX, posY, m_label.angle, m_label.textColor, m_label.shadowColor, m_label.align, m_width - m_label.offsetX); CGUIControl::Render(); return; @@ -199,7 +199,7 @@ void CGUIFadeLabelControl::Render() if (m_label.align & XBFONT_CENTER_X) posX = m_posX + m_width * 0.5f; else if (m_label.align & XBFONT_RIGHT) - posX = m_posX + m_width; + posX = m_posX + m_width - m_textLayout.GetTextWidth(); m_textLayout.Render(posX, posY, 0, m_label.textColor, m_label.shadowColor, m_label.align, m_width); } else -- 2.11.4.GIT