diff options
author | ronso0 <ronso0@mixxx.org> | 2020-11-17 22:56:33 +0100 |
---|---|---|
committer | ronso0 <ronso0@mixxx.org> | 2020-11-24 23:35:32 +0100 |
commit | 0e76005084ae16063d57aedadd405f47d4c81a0b (patch) | |
tree | 2b64f94562f28554e90cda28e0d0271c2590d6ed | |
parent | 6c793386cc5f3748699f232c611b024339e4cc3a (diff) |
Library: paint location text like other selected cells' text
-rw-r--r-- | src/library/locationdelegate.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/library/locationdelegate.cpp b/src/library/locationdelegate.cpp index bb197bdadc..cf48a9a1a7 100644 --- a/src/library/locationdelegate.cpp +++ b/src/library/locationdelegate.cpp @@ -13,6 +13,13 @@ void LocationDelegate::paintItem( const QModelIndex& index) const { paintItemBackground(painter, option, index); + if (option.state & QStyle::State_Selected) { + // This uses selection-color from stylesheet for the text pen: + // #LibraryContainer QTableView { + // selection-color: #fff; + // } + painter->setPen(QPen(option.palette.highlightedText().color())); + } QString elidedText = option.fontMetrics.elidedText( index.data().toString(), Qt::ElideLeft, |