Sync from development - prepare for v0.2.0

This commit is contained in:
Omni
2025-12-06 20:09:55 +00:00
parent fe14e4ecfb
commit ce969eba1b
277 changed files with 14059 additions and 3899 deletions

View File

@@ -17,6 +17,7 @@ from PySide6.QtGui import QFont
from jackify.backend.models.configuration import SystemInfo
from ..shared_theme import JACKIFY_COLOR_BLUE
from ..utils import set_responsive_minimum
logger = logging.getLogger(__name__)
@@ -35,8 +36,8 @@ class AdditionalTasksScreen(QWidget):
def _setup_ui(self):
"""Set up the user interface following ModlistTasksScreen pattern"""
layout = QVBoxLayout()
layout.setContentsMargins(40, 40, 40, 40)
layout.setSpacing(0)
layout.setContentsMargins(30, 30, 30, 30) # Reduced from 40
layout.setSpacing(12) # Match main menu spacing
# Header section
self._setup_header(layout)
@@ -50,55 +51,58 @@ class AdditionalTasksScreen(QWidget):
def _setup_header(self, layout):
"""Set up the header section"""
header_widget = QWidget()
header_layout = QVBoxLayout()
header_layout.setSpacing(0)
header_layout.setContentsMargins(0, 0, 0, 0)
header_layout.setSpacing(2)
# Title
title = QLabel("<b>Additional Tasks & Tools</b>")
title.setStyleSheet(f"font-size: 24px; color: {JACKIFY_COLOR_BLUE};")
title.setStyleSheet(f"font-size: 20px; color: {JACKIFY_COLOR_BLUE};")
title.setAlignment(Qt.AlignHCenter)
header_layout.addWidget(title)
# Add a spacer to match main menu vertical spacing
header_layout.addSpacing(16)
# Description
desc = QLabel(
"TTW automation and additional tools.<br>&nbsp;"
)
header_layout.addSpacing(10)
# Description area with fixed height
desc = QLabel("TTW automation and additional tools.")
desc.setWordWrap(True)
desc.setStyleSheet("color: #ccc;")
desc.setStyleSheet("color: #ccc; font-size: 13px;")
desc.setAlignment(Qt.AlignHCenter)
desc.setMaximumHeight(50) # Fixed height for description zone
header_layout.addWidget(desc)
header_layout.addSpacing(24)
# Separator (shorter like main menu)
header_layout.addSpacing(12)
# Separator
sep = QLabel()
sep.setFixedHeight(2)
sep.setFixedWidth(400) # Match button width
sep.setStyleSheet("background: #fff;")
header_layout.addWidget(sep, alignment=Qt.AlignHCenter)
header_layout.addSpacing(16)
layout.addLayout(header_layout)
header_layout.addSpacing(10)
header_widget.setLayout(header_layout)
header_widget.setFixedHeight(120) # Fixed total header height
layout.addWidget(header_widget)
def _setup_menu_buttons(self, layout):
"""Set up the menu buttons section"""
# Menu options - ONLY TTW and placeholder
MENU_ITEMS = [
("Install TTW", "ttw_install", "Install Tale of Two Wastelands using Hoolamike automation"),
("Install TTW", "ttw_install", "Install Tale of Two Wastelands using TTW_Linux_Installer"),
("Coming Soon...", "coming_soon", "Additional tools will be added in future updates"),
("Return to Main Menu", "return_main_menu", "Go back to the main menu"),
]
# Create grid layout for buttons (mirror ModlistTasksScreen pattern)
button_grid = QGridLayout()
button_grid.setSpacing(16)
button_grid.setSpacing(12) # Reduced from 16
button_grid.setAlignment(Qt.AlignHCenter)
button_width = 400
button_height = 50
button_height = 40 # Reduced from 50
for i, (label, action_id, description) in enumerate(MENU_ITEMS):
# Create button
@@ -109,8 +113,8 @@ class AdditionalTasksScreen(QWidget):
background-color: #4a5568;
color: white;
border: none;
border-radius: 8px;
font-size: 14px;
border-radius: 6px;
font-size: 13px;
font-weight: bold;
text-align: center;
}}
@@ -126,7 +130,7 @@ class AdditionalTasksScreen(QWidget):
# Description label
desc_label = QLabel(description)
desc_label.setAlignment(Qt.AlignHCenter)
desc_label.setStyleSheet("color: #999; font-size: 12px;")
desc_label.setStyleSheet("color: #999; font-size: 11px;") # Reduced from 12px
desc_label.setWordWrap(True)
desc_label.setFixedWidth(button_width)
@@ -166,4 +170,18 @@ class AdditionalTasksScreen(QWidget):
def _return_to_main_menu(self):
"""Return to main menu"""
if self.stacked_widget:
self.stacked_widget.setCurrentIndex(self.main_menu_index)
self.stacked_widget.setCurrentIndex(self.main_menu_index)
def showEvent(self, event):
"""Called when the widget becomes visible - resize to compact size"""
super().showEvent(event)
try:
main_window = self.window()
if main_window:
from PySide6.QtCore import QSize
# Only set minimum size - DO NOT RESIZE
main_window.setMaximumSize(QSize(16777215, 16777215))
set_responsive_minimum(main_window, min_width=960, min_height=420)
# DO NOT resize - let window stay at current size
except Exception:
pass