summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorronso0 <ronso0@mixxx.org>2020-11-17 22:56:33 +0100
committerronso0 <ronso0@mixxx.org>2020-11-24 23:35:32 +0100
commit0e76005084ae16063d57aedadd405f47d4c81a0b (patch)
tree2b64f94562f28554e90cda28e0d0271c2590d6ed
parent6c793386cc5f3748699f232c611b024339e4cc3a (diff)
Library: paint location text like other selected cells' text
-rw-r--r--src/library/locationdelegate.cpp7
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,