Skip to content

Commit

Permalink
Merge pull request #16 from bekindpleaserewind/feature-beta
Browse files Browse the repository at this point in the history
Cleaned up table view foreground color
  • Loading branch information
bekindpleaserewind authored Dec 6, 2023
2 parents 776fcc4 + 6790e61 commit 0091b39
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions gamefinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,22 +331,30 @@ def getColorFromHex(self, hex):
return(color)

def generateRow(self, row, noColor = False):
foreground = self.getColorFromHex("000000")
if noColor:
color = self.getColorFromHex("ffffff")
else:
color = self.getColorFromHex("92d050")

itemId = QTableWidgetItem(row[0])
itemId.setBackground(color)
itemId.setForeground(foreground)
title = QTableWidgetItem(row[1])
title.setBackground(color)
title.setForeground(foreground)
price = QTableWidgetItem(row[2])
price.setBackground(color)
price.setForeground(foreground)
currency = QTableWidgetItem(row[3])
currency.setBackground(color)
currency.setForeground(foreground)
bestOffer = QTableWidgetItem(row[4])
bestOffer.setBackground(color)
bestOffer.setForeground(foreground)
buyItNow = QTableWidgetItem(row[5])
buyItNow.setBackground(color)
buyItNow.setForeground(foreground)

if noColor:
link = LinkWidget(row[6], "#ffffff", [itemId, title, price, currency, bestOffer, buyItNow], self)
Expand Down

0 comments on commit 0091b39

Please sign in to comment.