Mercurial > hg > Feedworm
view FeedEntryItemDelegate.py @ 258:4ca1fac32dde
Pull the constant of days to keep feed entries into the abstract class
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Tue, 12 Mar 2019 02:39:18 +0100 |
parents | 3ce39af93e77 |
children |
line wrap: on
line source
# -*- coding: utf-8 -*- from PyQt5.QtGui import QFont from PyQt5.QtWidgets import 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)