mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-23 00:47:21 -06:00
- Improved a lot the download list delegate
- Replaced Qt::TextColorRole by Qt::ForegroundRole because it is deprecated
This commit is contained in:
@@ -47,7 +47,7 @@ class SearchListDelegate: public QAbstractItemDelegate {
|
||||
void paint(QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index) const{
|
||||
QStyleOptionViewItem opt = option;
|
||||
// set text color
|
||||
QVariant value = index.data(Qt::TextColorRole);
|
||||
QVariant value = index.data(Qt::ForegroundRole);
|
||||
if (value.isValid() && qvariant_cast<QColor>(value).isValid()){
|
||||
opt.palette.setColor(QPalette::Text, qvariant_cast<QColor>(value));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user