mirror of
https://github.com/akissinger/dodo.git
synced 2024-10-03 22:17:15 +03:00
better hilighting of flagged messages
This commit is contained in:
parent
14960c14dd
commit
dce74a7125
@ -103,14 +103,17 @@ class SearchModel(QAbstractItemModel):
|
||||
else:
|
||||
font = QFont(settings.search_font, settings.search_font_size)
|
||||
|
||||
if 'unread' in thread_d['tags']:
|
||||
if 'unread' in thread_d['tags'] or 'flagged' in thread_d['tags']:
|
||||
font.setBold(True)
|
||||
return font
|
||||
elif role == Qt.ForegroundRole:
|
||||
color = 'fg_' + col
|
||||
unread_color = 'fg_' + col + '_unread'
|
||||
flagged_color = 'fg_' + col + '_flagged'
|
||||
if 'unread' in thread_d['tags'] and unread_color in settings.theme:
|
||||
return QColor(settings.theme[unread_color])
|
||||
elif 'flagged' in thread_d['tags'] and flagged_color in settings.theme:
|
||||
return QColor(settings.theme[flagged_color])
|
||||
elif color in settings.theme:
|
||||
return QColor(settings.theme[color])
|
||||
else:
|
||||
|
@ -75,6 +75,7 @@ solarized_dark = {
|
||||
'fg_highlight': solarized_p['base01'],
|
||||
'fg_subject': solarized_p['base0'],
|
||||
'fg_subject_unread': solarized_p['base2'],
|
||||
'fg_subject_flagged': solarized_p['violet'],
|
||||
'fg_from': solarized_p['blue'],
|
||||
'fg_date': solarized_p['cyan'],
|
||||
'fg_tags': solarized_p['violet'],
|
||||
@ -99,6 +100,7 @@ solarized_light = {
|
||||
'fg_highlight': solarized_p['base1'],
|
||||
'fg_subject': solarized_p['base0'],
|
||||
'fg_subject_unread': solarized_p['base02'],
|
||||
'fg_subject_flagged': solarized_p['violet'],
|
||||
'fg_from': solarized_p['blue'],
|
||||
'fg_date': solarized_p['cyan'],
|
||||
'fg_tags': solarized_p['violet'],
|
||||
@ -123,9 +125,10 @@ nord = {
|
||||
'fg_highlight': nord_p['polar0'],
|
||||
'fg_subject': nord_p['snow0'],
|
||||
'fg_subject_unread': nord_p['aurora4'],
|
||||
'fg_subject_flagged': nord_p['aurora2'],
|
||||
'fg_from': nord_p['frost3'],
|
||||
'fg_date': nord_p['polar3'],
|
||||
'fg_tags': nord_p['aurora2'],
|
||||
'fg_tags': nord_p['frost2'],
|
||||
}
|
||||
"""Theme based on the `Nord`_ palette
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user