ui changes, formatting

This commit is contained in:
WorldTeacher
2024-06-05 15:39:55 +02:00
parent 98849f22a0
commit a56c70a8b4
26 changed files with 1163 additions and 402 deletions

View File

@@ -1,7 +1,8 @@
from PyQt6 import QtCore, QtGui
import darkdetect
# from src import MyLogger
from omegaconf import OmegaConf
import darkdetect
from PyQt6 import QtCore, QtGui
config = OmegaConf.load("config.yaml")
config = OmegaConf.load(f"{config.icon_path}/icons.yaml")
@@ -11,14 +12,16 @@ 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):
self.icon = QtGui.QIcon()
self.add_icon(icon_type)
if widget is not None:
widget.setIcon(self.icon)
def add_icon(self, icon_type):
icon = config[icon_type]
print(icon)
@@ -28,11 +31,10 @@ class Icon:
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.")
print("This is a module and can not be executed directly.")