diff --git a/src/calibre/gui2/__init__.py b/src/calibre/gui2/__init__.py index ceac21dd30..5fcde65ff5 100644 --- a/src/calibre/gui2/__init__.py +++ b/src/calibre/gui2/__init__.py @@ -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): diff --git a/src/qtcurve/style/qtcurve.cpp b/src/qtcurve/style/qtcurve.cpp index 58a32c3479..e3bb17d244 100644 --- a/src/qtcurve/style/qtcurve.cpp +++ b/src/qtcurve/style/qtcurve.cpp @@ -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") &&