Exemplo n.º 1
0
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'))
Exemplo n.º 2
0
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'))
Exemplo n.º 3
0
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'))
Exemplo n.º 4
0
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'))