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 87cd9d8c..377b6abb 100644 --- a/ryven-editor/setup.cfg +++ b/ryven-editor/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = ryven -version = 3.4.0 +version = 3.4.1 author = Leon Thomm author_email = l.thomm@mailbox.org description = Flow-based visual scripting for Python diff --git a/ryvencore-qt/setup.cfg b/ryvencore-qt/setup.cfg index ebfb0638..b45dd084 100644 --- a/ryvencore-qt/setup.cfg +++ b/ryvencore-qt/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = ryvencore-qt -version = v0.4.0 +version = v0.4.1 author = Leon Thomm author_email = l.thomm@mailbox.org description = Qt frontend for ryvencore; Library for building Visual Node Editors