Update stockTicker.py

This commit is contained in:
Justin 2023-03-31 17:14:40 +08:00 committed by GitHub
parent 5a4f4a13f3
commit 252ee8b609
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1933,7 +1933,7 @@ class StockTicker():
preprice_img = self.textImage(preprice, font, r = 200, g = 200 , b = 200)
prechange_img = self.textImage(prechange, font, r = 200, g = 200, b = 200)
prepercent_img = self.textImage('('+prepercent + '%' + ')', font, r=200, g=200, b=200)
arrow = Image.open('logos/up-tiny.png')
arrow = Image.open('logos/up-tiny2.png')
else:
preprice_img = self.textImage(preprice, font, r = 0, g = 255 , b = 0)
prechange_img = self.textImage(prechange, font, r = 0, g = 255, b = 0)
@ -1967,7 +1967,7 @@ class StockTicker():
postprice_img = self.textImage(postprice, font, r = 200, g = 200 , b = 200)
postchange_img = self.textImage(postchange, font, r = 200, g = 200, b = 200)
postpercent_img = self.textImage('('+postpercent + '%' + ')', font, r=200, g=200, b=200)
arrow = Image.open('logos/up-tiny.png')
arrow = Image.open('logos/up-tiny2.png')
else:
postprice_img = self.textImage(postprice, font, r =0, g = 255 , b = 0)
postchange_img = self.textImage(postchange, font, r = 0, g = 255, b = 0)
@ -2196,6 +2196,11 @@ class StockTicker():
prechange_img = self.textImage(prechange, font, r = 255, g = 0, b = 0)
prepercent_img = self.textImage('('+prepercent + '%' + ')', font, r=255, g=0, b=0)
arrow = Image.open('logos/down-tiny.png')
elif prepost_settings[symbol]['Pre-market']['prechange'] == '0.00':
preprice_img = self.textImage(preprice, font, r = 200, g = 200 , b = 200)
prechange_img = self.textImage(prechange, font, r = 200, g = 200, b = 200)
prepercent_img = self.textImage('('+prepercent + '%' + ')', font, r=200, g=200, b=200)
arrow = Image.open('logos/up-tiny2.png')
else:
preprice_img = self.textImage(preprice, font, r = 0, g = 255 , b = 0)
prechange_img = self.textImage(prechange, font, r = 0, g = 255, b = 0)
@ -2224,6 +2229,11 @@ class StockTicker():
postchange_img = self.textImage(postchange, font, r = 255, g = 0, b = 0)
postpercent_img = self.textImage('('+postpercent +'%'+')', font, r=255, g=0, b=0)
arrow = Image.open('logos/down-tiny.png')
elif prepost_settings[symbol]['Post-market']['postchange'] == '0.00':
postprice_img = self.textImage(postprice, font, r = 200, g = 200, b = 200)
postchange_img = self.textImage(postchange, font, r = 200, g = 200, b = 200)
postpercent_img = self.textImage('('+postpercent +'%'+')', font, r=200, g=200, b=200)
arrow = Image.open('logos/up-tiny2.png')
else:
postprice_img = self.textImage(postprice, font, r =0, g = 255 , b = 0)
postchange_img = self.textImage(postchange, font, r = 0, g = 255, b = 0)