1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-03-10 22:22:58 +00:00

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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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