From 5fced6667ba4e03793bcc87831a37869046b5383 Mon Sep 17 00:00:00 2001 From: mhz1g21 <mhz1g21@soton.ac.uk> Date: Fri, 29 Nov 2024 15:42:43 +0000 Subject: [PATCH] enhanced UI for advanced and simple tabs: updated group box styles and color scheme for improved visibility and consistency --- scripts/advanced_tab.py | 158 ++++++++++++++++++++++++++++++++++++++++ scripts/simple_tab.py | 8 +- 2 files changed, 162 insertions(+), 4 deletions(-) diff --git a/scripts/advanced_tab.py b/scripts/advanced_tab.py index 85617dd..52860a4 100644 --- a/scripts/advanced_tab.py +++ b/scripts/advanced_tab.py @@ -44,44 +44,202 @@ class AdvancedTab(QWidget): def add_module_controls(self, layout): # Status section for overall progress status_group, self.status_text = create_group_with_text("Pipeline Status", 100) + status_group.setStyleSheet(""" + QGroupBox { + font-weight: bold; + border: 2px solid grey; + border-radius: 10px; + margin-top: 10px; + background-color: #3e3e3e; + padding: 20px; + } + QGroupBox::title { + margin: 10px; + background-color: transparent; + color: white; + } + """) + self.status_text.setStyleSheet(""" + QTextEdit { + background-color: #1e1e1e; + color: white; + border: 2px solid grey; + border-radius: 10px; + padding: 10px; + font-size: 14px; + } + QTextEdit:focus { + border: 2px solid #05B8CC; + } + """) layout.addWidget(status_group) # Image Shifter Controls shifter_group = QGroupBox("Image Shifter") shifter_layout = QVBoxLayout(shifter_group) + shifter_group.setStyleSheet(""" + QGroupBox { + font-weight: bold; + border: 2px solid grey; + border-radius: 10px; + margin-top: 10px; + background-color: #3e3e3e; + padding: 20px; + } + QGroupBox::title { + margin: 10px; + background-color: transparent; + color: white; + } + """) # Add shifter specific controls layout.addWidget(shifter_group) # Depth Estimation Controls depth_group = QGroupBox("Depth Estimation") depth_layout = QVBoxLayout(depth_group) + depth_group.setStyleSheet(""" + QGroupBox { + font-weight: bold; + border: 2px solid grey; + border-radius: 10px; + margin-top: 10px; + background-color: #3e3e3e; + padding: 20px; + } + QGroupBox::title { + margin: 10px; + background-color: transparent; + color: white; + } + """) # Add depth estimation specific controls layout.addWidget(depth_group) # Material Recognition Controls material_group = QGroupBox("Material Recognition") material_layout = QVBoxLayout(material_group) + material_group.setStyleSheet(""" + QGroupBox { + font-weight: bold; + border: 2px solid grey; + border-radius: 10px; + margin-top: 10px; + background-color: #3e3e3e; + padding: 20px; + } + QGroupBox::title { + margin: 10px; + background-color: transparent; + color: white; + } + """) # Add material recognition specific controls layout.addWidget(material_group) # EdgeNet Controls edgenet_group = QGroupBox("EdgeNet") edgenet_layout = QVBoxLayout(edgenet_group) + edgenet_group.setStyleSheet(""" + QGroupBox { + font-weight: bold; + border: 2px solid grey; + border-radius: 10px; + margin-top: 10px; + background-color: #3e3e3e; + padding: 20px; + } + QGroupBox::title { + margin: 10px; + background-color: transparent; + color: white; + } + """) # Add EdgeNet specific controls layout.addWidget(edgenet_group) # Mesh Processing Controls mesh_group = QGroupBox("Mesh Processing") mesh_layout = QVBoxLayout(mesh_group) + mesh_group.setStyleSheet(""" + QGroupBox { + font-weight: bold; + border: 2px solid grey; + border-radius: 10px; + margin-top: 10px; + background-color: #3e3e3e; + padding: 20px; + } + QGroupBox::title { + margin: 10px; + background-color: transparent; + color: white; + } + """) # Add mesh processing specific controls layout.addWidget(mesh_group) # Preview section preview_group = QGroupBox("Preview") preview_layout = QHBoxLayout(preview_group) + preview_group.setStyleSheet(""" + QGroupBox { + font-weight: bold; + border: 2px solid grey; + border-radius: 10px; + margin-top: 10px; + background-color: #3e3e3e; + padding: 20px; + } + QGroupBox::title { + margin: 10px; + background-color: transparent; + color: white; + } + """) input_group, self.input_preview = create_preview_group("Input") output_group, self.output_preview = create_preview_group("Output") + input_group.setStyleSheet(""" + QGroupBox { + font-weight: bold; + border: 2px solid grey; + border-radius: 10px; + margin-top: 10px; + background-color: #1e1e1e; + padding: 20px; + } + QGroupBox::title { + margin: 10px; + background-color: transparent; + color: white; + } + QLabel { + margin: 5px; + background-color: #1e1e1e; + color: white; + } + """) + output_group.setStyleSheet(""" + QGroupBox { + font-weight: bold; + border: 2px solid grey; + border-radius: 10px; + margin-top: 10px; + background-color: #1e1e1e; + padding: 20px; + } + QGroupBox::title { + margin: 10px; + background-color: transparent; + color: white; + } + QLabel { + margin: 5px; + background-color: #1e1e1e; + color: white; + } + """) preview_layout.addWidget(input_group) preview_layout.addWidget(output_group) diff --git a/scripts/simple_tab.py b/scripts/simple_tab.py index 2408fcb..9a4554c 100644 --- a/scripts/simple_tab.py +++ b/scripts/simple_tab.py @@ -390,7 +390,7 @@ class SimpleTab(QWidget): border: 2px solid grey; border-radius: 10px; margin-top: 10px; - background-color: #3e3e3e; + background-color: #1e1e1e; padding: 20px; } QGroupBox::title { @@ -400,7 +400,7 @@ class SimpleTab(QWidget): } QLabel { margin: 5px; - background-color: #3e3e3e; + background-color: #1e1e1e; color: white; } """) @@ -410,7 +410,7 @@ class SimpleTab(QWidget): border: 2px solid grey; border-radius: 10px; margin-top: 10px; - background-color: #3e3e3e; + background-color: #1e1e1e; padding: 20px; } QGroupBox::title { @@ -420,7 +420,7 @@ class SimpleTab(QWidget): } QLabel { margin: 5px; - background-color: #3e3e3e; + background-color: #1e1e1e; color: white; } """) -- GitLab