diff --git a/src/utils/icon.py b/src/utils/icon.py index 3ec662f..c33cf51 100644 --- a/src/utils/icon.py +++ b/src/utils/icon.py @@ -1,8 +1,6 @@ import darkdetect - -# from src import MyLogger from omegaconf import OmegaConf -from PyQt6 import QtCore, QtGui +from PyQt6 import QtGui config = OmegaConf.load("config.yaml") config = OmegaConf.load(f"{config.icon_path}/icons.yaml") @@ -11,9 +9,6 @@ path = config.icon_path dark = darkdetect.isDark() mode = "dark" if dark else "light" path = f"{path}/{mode}" - - -# log = MyLogger("Icon") class Icon: def __init__(self, icon_type, widget=None): @@ -24,17 +19,13 @@ class Icon: def add_icon(self, icon_type): icon = config[icon_type] - print(icon) + icon = f"{path}/{icon}" self.icon.addPixmap( - QtGui.QPixmap(f"{path}/{icon}"), + QtGui.QPixmap(icon), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off, ) - @staticmethod - def icondata(self): - return self.icon - if __name__ == "__main__": print("This is a module and can not be executed directly.")