def set_icons_theme(theme, resource=None, output=None): """""" resources = ResourseGenerator(primary=theme['primaryColor'], disabled=theme['secondaryLightColor']) resources.generate() QDir.addSearchPath('icon', resources.index) QDir.addSearchPath('qt_material', os.path.join(os.path.dirname(__file__), 'resources'))
def set_icons_theme(theme, parent='theme'): """""" source = os.path.join(os.path.dirname(__file__), 'resources', 'source') resources = ResourseGenerator(primary=theme['primaryColor'], secondary=theme['secondaryColor'], disabled=theme['secondaryLightColor'], source=source, parent=parent) resources.generate() QDir.addSearchPath('icon', resources.index) QDir.addSearchPath('qt_material', os.path.join(os.path.dirname(__file__), 'resources'))
def generate_icons() -> None: """""" source = os.path.join(os.path.dirname(__file__), 'source') resources = ResourseGenerator( primary=os.getenv('QTMATERIAL_PRIMARYCOLOR'), secondary=os.getenv('QTMATERIAL_SECONDARYCOLOR'), disabled=os.getenv('QTMATERIAL_SECONDARYLIGHTCOLOR'), source=source, parent='bci_framework', ) resources.generate() QDir.addSearchPath('bci', resources.index) QDir.addSearchPath('icons-dark', os.path.join(os.path.dirname(__file__), 'icons-dark'))
def set_icons_theme(theme, parent='theme'): """""" source = os.path.join(os.path.dirname(__file__), 'resources', 'source') resources = ResourseGenerator(primary=theme['primaryColor'], secondary=theme['secondaryColor'], disabled=theme['secondaryLightColor'], source=source, parent=parent) resources.generate() if GUI: try: QDir.addSearchPath('icon', resources.index) QDir.addSearchPath('qt_material', os.path.join( os.path.dirname(__file__), 'resources')) except: # snake_case, true_property QDir.add_search_path('icon', resources.index) QDir.add_search_path('qt_material', os.path.join( os.path.dirname(__file__), 'resources'))