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 19:59:55 +0000 (20:59 +0100)
this fixes bug #487 (patch by Dr.Best)

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

index 3452e27..cd055a8 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))
                                        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:
                                elif attrib == "picServiceEventProgressbar":
                                        pic = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, value))
                                        if pic:
index f8ac0ff..cc8c32b 100644 (file)
@@ -531,12 +531,15 @@ void eListboxServiceContent::paint(gPainter &painter, eWindowStyle &style, const
                bool paintProgress = false;
                ePtr<eServiceEvent> evt;
 
                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));
                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)
                }
 
                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 (!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;
                                        }
                                        else
                                                continue;
index 982d7e1..589afba 100644 (file)
@@ -90,6 +90,8 @@ public:
                serviceEventProgressbarColorSelected,
                serviceEventProgressbarBorderColor,
                serviceEventProgressbarBorderColorSelected,
                serviceEventProgressbarColorSelected,
                serviceEventProgressbarBorderColor,
                serviceEventProgressbarBorderColorSelected,
+               serviceDescriptionColor,
+               serviceDescriptionColorSelected,
                colorElements
        };
        
                colorElements
        };