Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change font color based on current temperature #208

Open
thessnake03 opened this issue Jan 19, 2021 · 0 comments
Open

Change font color based on current temperature #208

thessnake03 opened this issue Jan 19, 2021 · 0 comments

Comments

@thessnake03
Copy link

Is it possible to change the font color based on current temp?

I'm new to python and this is my first project. I've been able to resize some elements and move them around to better suit my needs. I was trying to set up different font colors based on temperature, but mainly couldn't find what varible it's stored as. I tried I few tihngs in the weather call that didn't exactly work.

My thinking is to set the font color in the weather call, based on the temp, along with all the other weather based text, then call it back during rendering.

Put in at ln 421
if (temper <= 32):
tempcolor.setText('#3300cc')
etc, different colors for the different ranges

Replace Config.textcolor with tempcolor in ln 2404 in the temp.setStyleSheet

Any help would be greatly appreciated. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants