diff options
| author | ghost <andreas.monzner@multimedia-labs.de> | 2010-03-24 20:59:55 +0100 |
|---|---|---|
| committer | ghost <andreas.monzner@multimedia-labs.de> | 2010-03-24 20:59:55 +0100 |
| commit | 2a8f4bb347c3cf4075bfa45cae2220d4562f74ee (patch) | |
| tree | ed4180d7e8968b2dbda7c5f7b3b68694b758253e | |
| parent | 05471750e4cea10659af169df1fa0e538e0bafdf (diff) | |
| download | enigma2-2a8f4bb347c3cf4075bfa45cae2220d4562f74ee.tar.gz enigma2-2a8f4bb347c3cf4075bfa45cae2220d4562f74ee.zip | |
make channel selection service description color configurable
this fixes bug #487 (patch by Dr.Best)
| -rw-r--r-- | lib/python/Components/ServiceList.py | 4 | ||||
| -rw-r--r-- | lib/service/listboxservice.cpp | 10 | ||||
| -rw-r--r-- | lib/service/listboxservice.h | 2 |
3 files changed, 16 insertions, 0 deletions
diff --git a/lib/python/Components/ServiceList.py b/lib/python/Components/ServiceList.py index 3452e27d..cd055a82 100644 --- a/lib/python/Components/ServiceList.py +++ b/lib/python/Components/ServiceList.py @@ -72,6 +72,10 @@ class ServiceList(HTMLComponent, GUIComponent): self.l.setColor(eListboxServiceContent.serviceEventProgressbarBorderColor, parseColor(value)) elif attrib == "colorEventProgressbarBorderSelected": self.l.setColor(eListboxServiceContent.serviceEventProgressbarBorderColorSelected, parseColor(value)) + elif attrib == "colorServiceDescription": + self.l.setColor(eListboxServiceContent.serviceDescriptionColor, parseColor(value)) + elif attrib == "colorServiceDescriptionSelected": + self.l.setColor(eListboxServiceContent.serviceDescriptionColorSelected, parseColor(value)) elif attrib == "picServiceEventProgressbar": pic = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, value)) if pic: diff --git a/lib/service/listboxservice.cpp b/lib/service/listboxservice.cpp index f8ac0ff2..cc8c32b5 100644 --- a/lib/service/listboxservice.cpp +++ b/lib/service/listboxservice.cpp @@ -531,12 +531,15 @@ void eListboxServiceContent::paint(gPainter &painter, eWindowStyle &style, const bool paintProgress = false; ePtr<eServiceEvent> evt; + bool serviceAvail = true; + if (!marked && isPlayable && service_info && m_is_playable_ignore.valid() && !service_info->isPlayable(*m_cursor, m_is_playable_ignore)) { if (m_color_set[serviceNotAvail]) painter.setForegroundColor(m_color[serviceNotAvail]); else painter.setForegroundColor(gRGB(0xbbbbbb)); + serviceAvail = false; } if (selected && local_style && local_style->m_selection) @@ -592,6 +595,13 @@ void eListboxServiceContent::paint(gPainter &painter, eWindowStyle &style, const if (!name.length()) continue; text = '(' + evt->getEventName() + ')'; + if (serviceAvail) + { + if (!selected && m_color_set[serviceDescriptionColor]) + painter.setForegroundColor(m_color[serviceDescriptionColor]); + else if (selected && m_color_set[serviceDescriptionColorSelected]) + painter.setForegroundColor(m_color[serviceDescriptionColorSelected]); + } } else continue; diff --git a/lib/service/listboxservice.h b/lib/service/listboxservice.h index 982d7e14..589afba6 100644 --- a/lib/service/listboxservice.h +++ b/lib/service/listboxservice.h @@ -90,6 +90,8 @@ public: serviceEventProgressbarColorSelected, serviceEventProgressbarBorderColor, serviceEventProgressbarBorderColorSelected, + serviceDescriptionColor, + serviceDescriptionColorSelected, colorElements }; |
