Make the darkness of the current cell highlight settable from python

This commit is contained in:
Kovid Goyal 2013-05-12 08:20:53 +05:30
parent f8d6970fd5
commit 1e06698942
2 changed files with 2 additions and 2 deletions

View File

@ -139,7 +139,7 @@ class BooksView(QTableView): # {{{
def __init__(self, parent, modelcls=BooksModel, use_edit_metadata_dialog=True):
QTableView.__init__(self, parent)
self.setProperty('highlight_current_item', True)
self.setProperty('highlight_current_item', 140)
self.row_sizing_done = False
if not tweaks['horizontal_scrolling_per_column']:

View File

@ -5251,7 +5251,7 @@ void Style::drawPrimitive(PrimitiveElement element, const QStyleOption *option,
? v4Opt->backgroundBrush.color()
: palette.color(cg, QPalette::Highlight));
if (state & State_HasFocus && widget && widget->property("highlight_current_item").toBool())
color = color.darker(130); // Added by Kovid to highlight the current cell in the book list
color = color.darker(widget->property("highlight_current_item").toInt()); // Added by Kovid to highlight the current cell in the book list
bool square((opts.square&SQUARE_LISTVIEW_SELECTION) &&
(/*(!widget && r.height()<=40 && r.width()>=48) || */