emailuis/nmailui/src/nmmessagelistviewitem.cpp
changeset 66 084b5b1f02a7
parent 62 a8c646b56683
child 68 83cc6bae1de8
--- a/emailuis/nmailui/src/nmmessagelistviewitem.cpp	Mon Aug 23 23:32:31 2010 +0300
+++ b/emailuis/nmailui/src/nmmessagelistviewitem.cpp	Fri Sep 03 14:07:42 2010 +0300
@@ -355,3 +355,24 @@
     }
     return ret;
 }
+
+/*!
+    Handle font color changes in the case of theme change
+ */ 
+bool NmMessageListViewItem::event(QEvent *event)
+{
+    bool ret = HbTreeViewItem::event(event);    
+    if (event && event->type() == HbEvent::ThemeChanged) {
+        NmMessageListModelItem *msgModelItem(NULL);
+        msgModelItem = modelIndex().data(
+            Qt::DisplayRole).value<NmMessageListModelItem*>();
+        if (msgModelItem && !msgModelItem->envelope().isRead()) {
+            setFontsUnread();
+        }
+        else if (msgModelItem) {
+            setFontsRead();
+        }
+    }
+    return ret;
+}
+