From 6475f30135a404b8037621819e28ff7ccb705f8e Mon Sep 17 00:00:00 2001 From: Philipp Kerling Date: Sun, 23 Dec 2018 21:15:54 +0100 Subject: [guilib] Scroll GUIListLabel on focus only when enabled Behavior changed as part of #12213, but the value of `m_scroll` (which can be use to inhibit scrolling on focus or always enable it) was not checked any more, which is clearly in error. Supersedes #15117 --- xbmc/guilib/GUIListLabel.cpp | 10 ++++------ xbmc/guilib/GUIListLabel.h | 1 - 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/xbmc/guilib/GUIListLabel.cpp b/xbmc/guilib/GUIListLabel.cpp index f98897d107..4416db06c4 100644 --- a/xbmc/guilib/GUIListLabel.cpp +++ b/xbmc/guilib/GUIListLabel.cpp @@ -27,11 +27,6 @@ CGUIListLabel::CGUIListLabel(int parentID, int controlID, float posX, float posY CGUIListLabel::~CGUIListLabel(void) = default; -void CGUIListLabel::SetScrolling(bool scrolling) -{ - m_label.SetScrolling(scrolling); -} - void CGUIListLabel::SetSelected(bool selected) { if(m_label.SetColor(selected ? CGUILabel::COLOR_SELECTED : CGUILabel::COLOR_TEXT)) @@ -41,7 +36,10 @@ void CGUIListLabel::SetSelected(bool selected) void CGUIListLabel::SetFocus(bool focus) { CGUIControl::SetFocus(focus); - SetScrolling(focus); + if (m_scroll == CGUIControl::FOCUS) + { + m_label.SetScrolling(focus); + } } CRect CGUIListLabel::CalcRenderRegion() const diff --git a/xbmc/guilib/GUIListLabel.h b/xbmc/guilib/GUIListLabel.h index 6f4e40d658..7228bc1c6c 100644 --- a/xbmc/guilib/GUIListLabel.h +++ b/xbmc/guilib/GUIListLabel.h @@ -40,7 +40,6 @@ public: void SetLabel(const std::string &label); void SetSelected(bool selected); - void SetScrolling(bool scrolling); static void CheckAndCorrectOverlap(CGUIListLabel &label1, CGUIListLabel &label2) { -- cgit v1.2.3