Skip to content
Snippets Groups Projects
Commit 7c2ef500 authored by mhz1g21's avatar mhz1g21
Browse files

enhanced UI: improved styling for main window, tabs, and controls; updated...

enhanced UI: improved styling for main window, tabs, and controls; updated color scheme and added visual effects
parent 69480338
No related branches found
No related tags found
1 merge request!8enhanced UI: improved styling for main window, tabs, and controls; updated...
......@@ -34,17 +34,47 @@ class VRSceneCreatorGUI(QMainWindow):
def setup_ui(self):
# Create main widget and layout
main_widget = QWidget()
main_widget.setStyleSheet("background-color: #1e1e1e;")
self.setCentralWidget(main_widget)
layout = QVBoxLayout(main_widget)
# Add title/header
header_label = QLabel("Immersive VR Scene Creator")
header_label.setAlignment(Qt.AlignmentFlag.AlignCenter)
header_label.setStyleSheet("font-size: 24px; font-weight: bold; margin: 10px;")
header_label.setStyleSheet("""
font-size: 24px;
font-weight: bold;
margin: 10px;
color: white;
text-shadow: 2px 2px 4px #000000;
""")
layout.addWidget(header_label)
# Create tab widget
self.tabs = QTabWidget()
self.tabs.setStyleSheet("""
QTabWidget::pane { /* The tab widget frame */
border-top: 2px solid #C2C7CB;
}
QTabBar::tab {
background: #3e3e3e;
color: white;
padding: 10px;
border: 1px solid #C2C7CB;
border-bottom: none;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
}
QTabBar::tab:selected {
background: #5e5e5e;
color: white;
border-color: #9B9B9B;
}
QTabBar::tab:hover {
background: #4e4e4e;
color: white;
}
""")
layout.addWidget(self.tabs)
# Initialize tabs
......
......@@ -160,26 +160,77 @@ class SimpleTab(QWidget):
# Controls section
controls_group = QGroupBox("Pipeline Controls")
controls_group.setStyleSheet("""
QGroupBox {
font-weight: bold;
border: 2px solid grey;
border-radius: 10px;
margin-top: 10px;
background-color: #3e3e3e;
padding: 15px;
}
QGroupBox::title {
margin: 10px;
background-color: transparent;
color: white;
}
""")
controls_layout = QVBoxLayout(controls_group)
# Info display
info_rows = [
("Input Image:", "No file selected"),
("Status:", "Ready")
("Status:", "Ready - Waiting for input"),
]
self.info_group, self.info_labels = create_info_group("Information", info_rows)
self.info_group.setStyleSheet("QGroupBox { font-weight: bold; }")
self.info_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;
}
QLabel{
margin: 5px;
background-color: #3e3e3e;
color: white;
}
""")
for label in self.info_labels.values():
label.setStyleSheet("""
QLabel{
margin: 5px;
background-color: #3e3e3e;
color: white;
}
""")
controls_layout.addWidget(self.info_group)
# Options
options_layout = QHBoxLayout()
self.include_top_check = QCheckBox("Include Top in Mesh")
self.include_top_check.setStyleSheet("QCheckBox { margin: 5px; }")
self.include_top_check.setStyleSheet("""
QCheckBox {
margin: 5px;
padding: 5px;
background-color: #3e3e3e;
color: white;
border: none;
border-radius: 5px;
}
""")
options_layout.addWidget(self.include_top_check)
self.shift_image_check = QCheckBox("Shift Input Image")
self.shift_image_check.setStyleSheet("QCheckBox { margin: 5px; }")
self.shift_image_check.setStyleSheet("QCheckBox { margin: 5px; background-color: #3e3e3e;}")
options_layout.addWidget(self.shift_image_check)
controls_layout.addLayout(options_layout)
......@@ -210,6 +261,7 @@ class SimpleTab(QWidget):
QPushButton {
margin: 5px;
padding: 5px;
border-radius: 10px;
}
QPushButton:enabled {
background-color: green;
......@@ -220,11 +272,19 @@ class SimpleTab(QWidget):
color: white;
}
""")
self.run_pipeline_btn.setFixedSize(600, 40) # Explicit size
buttons_layout = QHBoxLayout()
self.select_btn = QPushButton("Select Input Image")
self.select_btn.clicked.connect(self.handle_file_select)
self.select_btn.setStyleSheet("QPushButton { margin: 5px; padding: 5px; }")
self.select_btn.setStyleSheet("""
QPushButton {
margin: 5px;
padding: 5px;
border-radius: 10px;
}
""")
self.select_btn.setFixedSize(600, 40) # Explicit size
buttons_layout.addWidget(self.select_btn)
buttons_layout.addWidget(self.run_pipeline_btn)
......@@ -233,16 +293,33 @@ class SimpleTab(QWidget):
layout.addWidget(controls_group)
# Status section
status_group, self.status_text = create_group_with_text("Pipeline Status", 150)
status_group, self.status_text = create_group_with_text("Pipeline Status", 300)
status_group.setStyleSheet("""
QGroupBox {
font-weight: bold;
border: 2px solid grey;
border-radius: 5px;
border-radius: 10px;
margin-top: 10px;
background-color: #3e3e3e;
padding: 20px;
}
QLabel {
margin: 5px;
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)
......@@ -253,8 +330,15 @@ class SimpleTab(QWidget):
QGroupBox {
font-weight: bold;
border: 2px solid grey;
border-radius: 5px;
border-radius: 10px;
margin-top: 10px;
background-color: #3e3e3e;
padding: 20px;
}
QGroupBox::title {
margin: 10px;
background-color: transparent;
color: white;
}
""")
preview_layout = QHBoxLayout(preview_group)
......@@ -264,17 +348,41 @@ class SimpleTab(QWidget):
input_group.setStyleSheet("""
QGroupBox {
font-weight: bold;
border: 1px solid grey;
border-radius: 5px;
border: 2px solid grey;
border-radius: 10px;
margin-top: 10px;
background-color: #3e3e3e;
padding: 20px;
}
QGroupBox::title {
margin: 10px;
background-color: transparent;
color: white;
}
QLabel {
margin: 5px;
background-color: #3e3e3e;
color: white;
}
""")
output_group.setStyleSheet("""
QGroupBox {
font-weight: bold;
border: 1px solid grey;
border-radius: 5px;
border: 2px solid grey;
border-radius: 10px;
margin-top: 10px;
background-color: #3e3e3e;
padding: 20px;
}
QGroupBox::title {
margin: 10px;
background-color: transparent;
color: white;
}
QLabel {
margin: 5px;
background-color: #3e3e3e;
color: white;
}
""")
preview_layout.addWidget(input_group)
......@@ -311,7 +419,7 @@ class SimpleTab(QWidget):
self.file_selected = True
self.flash_timer.stop()
self.select_btn.setStyleSheet("QPushButton { margin: 5px; padding: 5px; }")
self.select_btn.setStyleSheet("QPushButton { margin: 5px; padding: 5px; border-radius: 10px;}")
def start_flashing(self):
if not self.file_selected:
......@@ -320,9 +428,9 @@ class SimpleTab(QWidget):
def toggle_flash(self):
current_style = self.select_btn.styleSheet()
if "background-color: DarkOrange;" in current_style:
self.select_btn.setStyleSheet("QPushButton { margin: 5px; padding: 5px; }")
self.select_btn.setStyleSheet("QPushButton { margin: 5px; padding: 5px; border-radius: 10px;}")
else:
self.select_btn.setStyleSheet("QPushButton { margin: 5px; padding: 5px; background-color: DarkOrange; }")
self.select_btn.setStyleSheet("QPushButton { margin: 5px; padding: 5px; background-color: DarkOrange; border-radius: 10px;}")
def run_full_pipeline(self):
if not self.input_path:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment