aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpkerling <pkerling@casix.org>2018-12-28 16:55:25 +0100
committerGitHub <noreply@github.com>2018-12-28 16:55:25 +0100
commit14086a7bd3a0b450ca8a79f1b5aa6c6566736245 (patch)
tree92cf835cff575a551047fca1fea95f7297bddafe
parent1f28354f3841dda366708d8208d5954b81223bcc (diff)
parent6475f30135a404b8037621819e28ff7ccb705f8e (diff)
Merge pull request #15124 from pkerling/guilistlabel-scroll18.0rc4-Leia
Scroll GUIListLabel on focus only when enabled
-rw-r--r--xbmc/guilib/GUIListLabel.cpp10
-rw-r--r--xbmc/guilib/GUIListLabel.h1
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)
{