aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorenen92 <enen92@users.noreply.github.com>2022-01-30 09:50:55 +0000
committerGitHub <noreply@github.com>2022-01-30 09:50:55 +0000
commitc0795d2a5e19ef05204c95bbfcf2b0fccd7890da (patch)
treec5a3c8bead94f15e6308e19b1c023466cce7b557
parentcd81a4331af4ac97b471896614831b52536c5d78 (diff)
parent13010b8a0490bdcda85e2509631d28d164fa7a64 (diff)
Merge pull request #20928 from enen92/fixautowidth
[GUI] Fix hitrect when using auto-width for button controls
-rw-r--r--xbmc/guilib/GUIButtonControl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/xbmc/guilib/GUIButtonControl.cpp b/xbmc/guilib/GUIButtonControl.cpp
index ec16e34d67..0e7f757edc 100644
--- a/xbmc/guilib/GUIButtonControl.cpp
+++ b/xbmc/guilib/GUIButtonControl.cpp
@@ -176,7 +176,7 @@ void CGUIButtonControl::ProcessText(unsigned int currentTime)
// auto-width - adjust hitrect
if (m_minWidth && m_width != renderWidth)
{
- CRect rect(m_posX, m_posY, renderWidth, m_height);
+ CRect rect{m_posX, m_posY, m_posX + renderWidth, m_posY + m_height};
SetHitRect(rect, m_hitColor);
}