Mercurial > hg > Feedworm
view FeedEntryItemDelegate.py @ 239:a15b3ee791a1
Automated merge with https://xanthippe.duckdns.org/hg/Feedworm
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Sat, 25 Apr 2015 04:10:12 +0200 |
parents | 94a902de5266 |
children | 3ce39af93e77 |
line wrap: on
line source
# -*- coding: utf-8 -*- from PyQt4.QtGui import QFont, QStyledItemDelegate class FeedEntryItemDelegate(QStyledItemDelegate): def __init__(self): super(FeedEntryItemDelegate, self).__init__(None) def paint(self, painter, style, index): entry = index.internalPointer() if entry.read: style.font.setWeight(QFont.Normal) else: style.font.setWeight(QFont.Bold) super(FeedEntryItemDelegate, self).paint(painter, style, index)