set selected torrentTableView backgroundstyle (#4458)

Fixes: #4375
This commit is contained in:
SweetPPro
2022-12-25 05:19:53 +11:00
committed by GitHub
parent 342ea650df
commit e40b3b05ba

View File

@@ -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;
}
}
}
}