make channel selection service description color configurable
authorghost <andreas.monzner@multimedia-labs.de>
Wed, 24 Mar 2010 19:59:55 +0000 (20:59 +0100)
committerghost <andreas.monzner@multimedia-labs.de>
Wed, 24 Mar 2010 20:00:24 +0000 (21:00 +0100)
this fixes bug #487 (patch by Dr.Best)

lib/python/Components/ServiceList.py
lib/service/listboxservice.cpp
lib/service/listboxservice.h

index 3452e27d7341f4ae641bce298e35e6d92896a568..cd055a82335cc7bb28907a9eff9a3ca0893d9a10 100644 (file)
@@ -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:
index f8ac0ff2ee904ecefb90e7cd70c886168153a6ba..cc8c32b50e64c6123fd4f58761f0f6eea059b9e9 100644 (file)
@@ -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;
index 982d7e14226521b5414f2e777de8eaa21cacbc1f..589afba633d78a8fa4feaadd7e49d5469a4b37b3 100644 (file)
@@ -90,6 +90,8 @@ public:
                serviceEventProgressbarColorSelected,
                serviceEventProgressbarBorderColor,
                serviceEventProgressbarBorderColorSelected,
+               serviceDescriptionColor,
+               serviceDescriptionColorSelected,
                colorElements
        };