Change the name of the column highlight tweak to make it more representative

This commit is contained in:
Charles Haley 2013-05-11 12:52:36 +02:00
parent cb93fd7329
commit 3f98133107
2 changed files with 5 additions and 3 deletions

View File

@ -542,4 +542,5 @@ highlight_virtual_library_book_count = True
# currently-selected cell. It must be an valid color name. See
# http://webdesign.about.com/od/colorcharts/l/bl_namedcolors.htm
# for a list of valid color names
column_highlight_color = 'lightgrey'
column_header_highlight_color = 'lightgrey'

View File

@ -165,7 +165,8 @@ class BooksModel(QAbstractTableModel): # {{{
self.current_highlighted_idx = None
self.highlight_only = False
self.current_index_column = -1
self.column_highlight_color = QVariant(QColor(tweaks['column_highlight_color']))
self.column_header_highlight_color = \
QVariant(QColor(tweaks['column_header_highlight_color']))
self.read_config()
def _clear_caches(self):
@ -909,7 +910,7 @@ class BooksModel(QAbstractTableModel): # {{{
if role == Qt.DisplayRole:
return QVariant(self.headers[self.column_map[section]])
if role == Qt.BackgroundRole and section == self.current_index_column:
return self.column_highlight_color
return self.column_header_highlight_color
return NONE
if DEBUG and role == Qt.ToolTipRole and orientation == Qt.Vertical:
col = self.db.field_metadata['uuid']['rec_index']