From efe8d8a0788273e306a6f268746d3b6ee7482a9b Mon Sep 17 00:00:00 2001 From: Stefano Simonelli <16114781+s-simoncelli@users.noreply.github.com> Date: Sun, 18 Feb 2024 10:26:45 +0000 Subject: [PATCH] Change tab order --- pywr_editor/main_window.py | 25 ++++++++++++------------- pywr_editor/schematic/canvas.py | 2 +- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/pywr_editor/main_window.py b/pywr_editor/main_window.py index 69e655c..70208a7 100644 --- a/pywr_editor/main_window.py +++ b/pywr_editor/main_window.py @@ -612,19 +612,7 @@ def setup_toolbar(self) -> None: self.app_actions.get("find-orphaned-parameters"), is_large=False ) - # Run tab - run = self.toolbar.add_tab("Run") - time_stepper_panel = run.add_panel("Time-stepper") - time_stepper_panel.add_widget(TimeStepperWidget(self)) - - nodes_panel = run.add_panel("Controls") - nodes_panel.add_widget(RunWidget(self)) - - results_panel = run.add_panel("Results") - results_panel.add_button(self.app_actions.get("run-inspector")) - # results_panel.add_button(self.app_actions.get("plot-data")) - - # Schematic tab + # Operation tab operation_tab = self.toolbar.add_tab("Operations") nodes_panel = operation_tab.add_panel("Undo", layout="vertical") nodes_panel.add_button(self.app_actions.get("undo"), is_large=False) @@ -643,6 +631,17 @@ def setup_toolbar(self) -> None: nodes_panel = operation_tab.add_panel("Nodes Library", show_name=False) nodes_panel.add_widget(SchematicItemsLibrary(self)) + # Run tab + run = self.toolbar.add_tab("Run") + time_stepper_panel = run.add_panel("Time-stepper") + time_stepper_panel.add_widget(TimeStepperWidget(self)) + + nodes_panel = run.add_panel("Controls") + nodes_panel.add_widget(RunWidget(self)) + + results_panel = run.add_panel("Results") + results_panel.add_button(self.app_actions.get("run-inspector")) + # View tab schematic_tab = self.toolbar.add_tab("Schematic") zoom_panel = schematic_tab.add_panel("Zoom") diff --git a/pywr_editor/schematic/canvas.py b/pywr_editor/schematic/canvas.py index 58e2d36..5397621 100644 --- a/pywr_editor/schematic/canvas.py +++ b/pywr_editor/schematic/canvas.py @@ -49,7 +49,7 @@ def paint( """ painter.setPen(QPen(Color("gray", 400).hex)) painter.setBrush(Qt.GlobalColor.white) - painter.drawRoundedRect(self.boundingRect(), 10, 10) + painter.drawRoundedRect(self.boundingRect(), 8, 8) @property def shadow(self) -> QGraphicsDropShadowEffect: