This commit is contained in:
Kovid Goyal 2013-05-12 01:06:57 +05:30
parent d99eccc51e
commit ee0e4e4d1a
2 changed files with 3 additions and 4 deletions

View File

@ -873,7 +873,6 @@ class Application(QApplication):
v = pcache[v]
icon_map[type('')(getattr(style, 'SP_'+k))] = v
style.setProperty(u'calibre_icon_map', icon_map)
style.setProperty(u'calibre_item_view_focus', 1)
self.__icon_map_memory_ = icon_map
def setup_styles(self, force_calibre_style):

View File

@ -5250,9 +5250,9 @@ void Style::drawPrimitive(PrimitiveElement element, const QStyleOption *option,
QColor color(hasCustomBackground && hasSolidBackground
? v4Opt->backgroundBrush.color()
: palette.color(cg, QPalette::Highlight));
if (state & State_HasFocus && widget->property("highlight_current_item").toBool()) {
color = color.darker(130);
}
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
bool square((opts.square&SQUARE_LISTVIEW_SELECTION) &&
(/*(!widget && r.height()<=40 && r.width()>=48) || */
(widget && !widget->inherits("KFilePlacesView") &&