aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Kerling <pkerling@casix.org>2018-12-23 21:15:54 +0100
committerPhilipp Kerling <pkerling@casix.org>2018-12-23 21:15:54 +0100
commit6475f30135a404b8037621819e28ff7ccb705f8e (patch)
treef36427e28c30a78dcda54c0b6a6e78e48e008eb4
parent2762a102b16f101390479f4e3882cff647afff2f (diff)
[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
-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)
{