mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-31 05:24:36 +01:00
Book list: Make the current cell have a darker background
This commit is contained in:
parent
17206c3a95
commit
d99eccc51e
2 changed files with 4 additions and 0 deletions
|
|
@ -139,6 +139,7 @@ def viewportEvent(self, event):
|
|||
|
||||
def __init__(self, parent, modelcls=BooksModel, use_edit_metadata_dialog=True):
|
||||
QTableView.__init__(self, parent)
|
||||
self.setProperty('highlight_current_item', True)
|
||||
self.row_sizing_done = False
|
||||
|
||||
if not tweaks['horizontal_scrolling_per_column']:
|
||||
|
|
|
|||
|
|
@ -5250,6 +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);
|
||||
}
|
||||
bool square((opts.square&SQUARE_LISTVIEW_SELECTION) &&
|
||||
(/*(!widget && r.height()<=40 && r.width()>=48) || */
|
||||
(widget && !widget->inherits("KFilePlacesView") &&
|
||||
|
|
|
|||
Loading…
Reference in a new issue