Add more custom colors to the side bar elements so we can theme selected items

This commit is contained in:
luisangelsm
2026-02-28 18:30:51 +01:00
parent 7e7c6a979c
commit 2beb00c65f
6 changed files with 156 additions and 61 deletions

View File

@ -50,7 +50,13 @@ void YACReaderReadingListsViewItemDeletegate::paint(QPainter *painter, const QSt
return;
}
QStyledItemDelegate::paint(painter, option, index);
// Promote hover to selected so QIcon::Selected mode activates on mouse-over,
// matching the QSS which already uses the same background for hover and selected.
QStyleOptionViewItem opt = option;
if (opt.state & QStyle::State_MouseOver)
opt.state |= QStyle::State_Selected;
QStyledItemDelegate::paint(painter, opt, index);
}
QSize YACReaderReadingListsViewItemDeletegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const