diff --git a/ryven-editor/ryven/main/Ryven.py b/ryven-editor/ryven/main/Ryven.py index da0c9c8a..aa68cb3c 100644 --- a/ryven-editor/ryven/main/Ryven.py +++ b/ryven-editor/ryven/main/Ryven.py @@ -63,10 +63,7 @@ def run(*args_, ------- None|Main Window """ - - from ryven.node_env import init_node_env - from ryven.gui_env import init_node_guis_env # Qt dependency - + # Process command line and method's arguments conf: Config = process_args(use_sysargs, *args_, **kwargs) @@ -74,11 +71,11 @@ def run(*args_, # Qt application setup # - # QtPy API - os.environ['QT_API'] = conf.qt_api - # Init environment os.environ['RYVEN_MODE'] = 'gui' + os.environ['QT_API'] = conf.qt_api + from ryven.node_env import init_node_env + from ryven.gui_env import init_node_guis_env # Qt dependency init_node_env() init_node_guis_env() diff --git a/ryven-editor/ryven/main/args_parser.py b/ryven-editor/ryven/main/args_parser.py index 7ba5861a..3ec94d6c 100644 --- a/ryven-editor/ryven/main/args_parser.py +++ b/ryven-editor/ryven/main/args_parser.py @@ -236,7 +236,7 @@ def parse_sys_args(just_defaults=False) -> Config: # Display group = parser.add_argument_group('display') - + group.add_argument( '-w', '--window-theme', choices=Config.get_available_window_themes(), diff --git a/ryven-editor/ryven/main/config.py b/ryven-editor/ryven/main/config.py index 77d978ce..6e415d7e 100644 --- a/ryven-editor/ryven/main/config.py +++ b/ryven-editor/ryven/main/config.py @@ -1,4 +1,5 @@ import pathlib +import os from typing import Optional, Literal, List, Dict, Set, Union from ryven import NodesPackage @@ -45,9 +46,12 @@ def get_available_window_themes() -> Set[str]: @staticmethod def get_available_flow_themes() -> Set[str]: - # FIXME: this is not stable api; expose it properly in ryvencore-qt - from ryvencore_qt.src.Design import Design - return {t.name for t in Design().flow_themes} + # TODO: expose this in ryvencore_qt without requiring Qt import, since QT_API is not set yet + return { + "Toy", "Tron", "Ghost", "Blender", "Simple", + "Ueli", "pure dark", "colorful dark", "pure light", + "colorful light", "Industrial", "Fusion" + } @staticmethod def get_available_performance_modes() -> Set[str]: diff --git a/ryven-editor/setup.cfg b/ryven-editor/setup.cfg index 377b6abb..e24dc0bd 100644 --- a/ryven-editor/setup.cfg +++ b/ryven-editor/setup.cfg @@ -19,7 +19,7 @@ classifiers = [options] packages = find: include_package_data = True -python_requires = >=3.6, <=3.10 +python_requires = >=3.6, <3.11 install_requires = ryvencore-qt ==0.4.* ryvencore ==0.4.*