Skip to content

Commit

Permalink
Fixed icon refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
DimseBoms committed Mar 13, 2023
1 parent 71ea661 commit c7e600e
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,16 +168,14 @@ def set_battery(self, mode):

# Refresh icons after thermal mode change
def icon_refresh(self):
# Set dynamic icons if the system is running KDE
if (self.kde):
if (self.thermal_mode == "balanced"):
self.setIcon(QIcon(f"{dir}/icons/breeze/face-smile-grin.svg"))
elif (self.thermal_mode == "cool-bottom"):
self.setIcon(QIcon(f"{dir}/icons/breeze/face-cool.svg"))
elif (self.thermal_mode == "quiet"):
self.setIcon(QIcon(f"{dir}/icons/breeze/face-ninja.svg"))
elif (self.thermal_mode == "performance"):
self.setIcon(QIcon(f"{dir}/icons/breeze/face-devilish.svg"))
if (self.thermal_mode == "balanced"):
self.setIcon(QIcon(f"{dir}/icons/breeze/face-smile-grin.svg"))
elif (self.thermal_mode == "cool-bottom"):
self.setIcon(QIcon(f"{dir}/icons/breeze/face-cool.svg"))
elif (self.thermal_mode == "quiet"):
self.setIcon(QIcon(f"{dir}/icons/breeze/face-ninja.svg"))
elif (self.thermal_mode == "performance"):
self.setIcon(QIcon(f"{dir}/icons/breeze/face-devilish.svg"))

# Helper method to replace mulitple characters in a string
def replace(self, string, chars, replacement):
Expand Down

0 comments on commit c7e600e

Please sign in to comment.