mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-06-14 00:44:34 +12:00
Fixes: Index card text almost invisible in dark themes. #183
This commit is contained in:
parent
2d020aba3a
commit
2cc721674a
|
@ -301,6 +301,7 @@ class corkDelegate(QStyledItemDelegate):
|
|||
text = index.data()
|
||||
|
||||
if text:
|
||||
p.setPen(Qt.black)
|
||||
if settings.viewSettings["Cork"]["Text"] != "Nothing":
|
||||
col = colors[settings.viewSettings["Cork"]["Text"]]
|
||||
if col == Qt.transparent:
|
||||
|
@ -357,6 +358,7 @@ class corkDelegate(QStyledItemDelegate):
|
|||
f = QFont(option.font)
|
||||
f.setBold(True)
|
||||
p.setFont(f)
|
||||
p.setPen(Qt.black)
|
||||
fm = QFontMetrics(f)
|
||||
elidedText = fm.elidedText(lineSummary, Qt.ElideRight, self.mainLineRect.width())
|
||||
p.drawText(self.mainLineRect, Qt.AlignLeft | Qt.AlignVCenter, elidedText)
|
||||
|
@ -364,8 +366,11 @@ class corkDelegate(QStyledItemDelegate):
|
|||
|
||||
# Full summary
|
||||
if fullSummary:
|
||||
p.save()
|
||||
p.setFont(option.font)
|
||||
p.setPen(Qt.black)
|
||||
p.drawText(self.mainTextRect, Qt.TextWordWrap, fullSummary)
|
||||
p.restore()
|
||||
|
||||
def paint_v1(self, p, option, index):
|
||||
# QStyledItemDelegate.paint(self, p, option, index)
|
||||
|
|
Loading…
Reference in a new issue