From e40b3b05bae77aaa0139b32e3f6367a776f6a2f0 Mon Sep 17 00:00:00 2001 From: SweetPPro Date: Sun, 25 Dec 2022 05:19:53 +1100 Subject: [PATCH] set selected torrentTableView backgroundstyle (#4458) Fixes: #4375 --- macosx/TorrentTableView.mm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/macosx/TorrentTableView.mm b/macosx/TorrentTableView.mm index 17297f2e5..e977bac02 100644 --- a/macosx/TorrentTableView.mm +++ b/macosx/TorrentTableView.mm @@ -211,6 +211,14 @@ static NSTimeInterval const kToggleProgressSeconds = 0.175; torrentCell.hoverControl = (row == self.controlButtonHoverRow); torrentCell.hoverReveal = (row == self.revealButtonHoverRow); torrentCell.hoverAction = (row == self.actionButtonHoverRow); + + // if cell is selected, set backgroundStyle + // then can provide alternate font color in TorrentCell - drawInteriorWithFrame + NSIndexSet* selectedRowIndexes = self.selectedRowIndexes; + if ([selectedRowIndexes containsIndex:row]) + { + torrentCell.backgroundStyle = NSBackgroundStyleEmphasized; + } } } }