mirror of
https://github.com/Omni-guides/Jackify.git
synced 2026-08-14 04:13:45 +02:00
Release v0.7 - Tools Hub, Engine Choice, NXM Link Handling, Native Component Install, NSF/CSF Support
This commit is contained in:
@@ -104,6 +104,14 @@ class OverallProgressIndicator(QWidget):
|
||||
# Update status text
|
||||
display_text = progress.display_text
|
||||
from jackify.shared.progress_models import InstallationPhase, FileProgress
|
||||
# CLF3 Status events populate progress.message with detail not captured by display_text.
|
||||
# Use the message directly when display_text is just the bare phase label.
|
||||
if (
|
||||
progress.message
|
||||
and progress.message not in ("Processing...", "")
|
||||
and display_text in (progress.phase_name, progress.phase.value.title() if progress.phase else "", "Processing...", "")
|
||||
):
|
||||
display_text = progress.message
|
||||
if not display_text or display_text == "Processing...":
|
||||
if progress.phase == InstallationPhase.UNKNOWN:
|
||||
# Don't overwrite the banner with "Unknown" for unrecognized section headers;
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
"""
|
||||
Summary progress widget for phase display (e.g. Installing 123/456).
|
||||
Summary progress widget for phase display (e.g. Queuing Archives 123/456).
|
||||
"""
|
||||
|
||||
from PySide6.QtWidgets import QWidget, QVBoxLayout, QLabel
|
||||
from PySide6.QtCore import QTimer
|
||||
from PySide6.QtWidgets import QWidget, QHBoxLayout, QLabel, QProgressBar, QSizePolicy
|
||||
from PySide6.QtCore import Qt, QTimer
|
||||
|
||||
from jackify.frontends.gui.shared_theme import JACKIFY_COLOR_BLUE
|
||||
|
||||
|
||||
class SummaryProgressWidget(QWidget):
|
||||
"""Widget showing summary progress for phases like Installing."""
|
||||
"""Single-row summary widget matching FileProgressItem layout."""
|
||||
|
||||
def __init__(self, phase_name: str, current_step: int, max_steps: int, parent=None):
|
||||
super().__init__(parent)
|
||||
@@ -16,8 +18,8 @@ class SummaryProgressWidget(QWidget):
|
||||
self.max_steps = max_steps
|
||||
self._target_step = current_step
|
||||
self._target_max = max_steps
|
||||
self._display_step = current_step
|
||||
self._display_max = max_steps
|
||||
self._display_step = float(current_step)
|
||||
self._display_max = float(max_steps)
|
||||
self._interpolation_timer = QTimer(self)
|
||||
self._interpolation_timer.timeout.connect(self._interpolate_counter)
|
||||
self._interpolation_timer.setInterval(16)
|
||||
@@ -26,12 +28,43 @@ class SummaryProgressWidget(QWidget):
|
||||
self._update_display()
|
||||
|
||||
def _setup_ui(self):
|
||||
layout = QVBoxLayout(self)
|
||||
layout.setContentsMargins(8, 8, 8, 8)
|
||||
layout.setSpacing(6)
|
||||
layout = QHBoxLayout(self)
|
||||
layout.setContentsMargins(4, 2, 4, 2)
|
||||
layout.setSpacing(8)
|
||||
|
||||
op_label = QLabel("»")
|
||||
op_label.setFixedWidth(20)
|
||||
op_label.setAlignment(Qt.AlignCenter)
|
||||
op_label.setStyleSheet(f"color: {JACKIFY_COLOR_BLUE}; font-weight: bold;")
|
||||
layout.addWidget(op_label)
|
||||
|
||||
self.text_label = QLabel()
|
||||
self.text_label.setStyleSheet("color: #ccc; font-size: 12px; font-weight: bold;")
|
||||
layout.addWidget(self.text_label)
|
||||
self.text_label.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed)
|
||||
self.text_label.setStyleSheet("color: #ccc; font-size: 11px;")
|
||||
layout.addWidget(self.text_label, 1)
|
||||
|
||||
self.percent_label = QLabel()
|
||||
self.percent_label.setFixedWidth(40)
|
||||
self.percent_label.setAlignment(Qt.AlignRight | Qt.AlignVCenter)
|
||||
self.percent_label.setStyleSheet("color: #aaa; font-size: 11px;")
|
||||
layout.addWidget(self.percent_label)
|
||||
|
||||
self.progress_bar = QProgressBar()
|
||||
self.progress_bar.setFixedHeight(12)
|
||||
self.progress_bar.setFixedWidth(80)
|
||||
self.progress_bar.setTextVisible(False)
|
||||
self.progress_bar.setStyleSheet(f"""
|
||||
QProgressBar {{
|
||||
border: 1px solid #444;
|
||||
border-radius: 2px;
|
||||
background-color: #1a1a1a;
|
||||
}}
|
||||
QProgressBar::chunk {{
|
||||
background-color: {JACKIFY_COLOR_BLUE};
|
||||
border-radius: 1px;
|
||||
}}
|
||||
""")
|
||||
layout.addWidget(self.progress_bar)
|
||||
|
||||
def _interpolate_counter(self):
|
||||
step_diff = self._target_step - self._display_step
|
||||
@@ -53,12 +86,16 @@ class SummaryProgressWidget(QWidget):
|
||||
display_max = int(round(self._display_max))
|
||||
|
||||
if display_max > 0:
|
||||
new_text = f"{self.phase_name} ({display_step}/{display_max})"
|
||||
self.text_label.setText(f"{self.phase_name} ({display_step}/{display_max})")
|
||||
pct = int(display_step / display_max * 100)
|
||||
if self.progress_bar.maximum() == 0:
|
||||
self.progress_bar.setRange(0, 100)
|
||||
self.progress_bar.setValue(pct)
|
||||
self.percent_label.setText(f"{pct}%")
|
||||
else:
|
||||
new_text = f"{self.phase_name}"
|
||||
|
||||
if self.text_label.text() != new_text:
|
||||
self.text_label.setText(new_text)
|
||||
self.text_label.setText(self.phase_name)
|
||||
self.progress_bar.setValue(0)
|
||||
self.percent_label.setText("")
|
||||
|
||||
def update_progress(self, current_step: int, max_steps: int):
|
||||
self._target_step = current_step
|
||||
|
||||
@@ -48,7 +48,7 @@ class UnsupportedGameDialog(QDialog):
|
||||
icon_label.setFont(QFont("Arial", 18, QFont.Weight.Bold))
|
||||
icon_label.setAlignment(Qt.AlignmentFlag.AlignCenter)
|
||||
icon_label.setFixedSize(32, 32)
|
||||
icon_label.setStyleSheet("color: #e67e22;")
|
||||
icon_label.setStyleSheet("color: #f0c040;")
|
||||
title_layout.addWidget(icon_label)
|
||||
title_label = QLabel("<b>VR Platform Notice</b>" if self.vr_warning else "<b>Game Support Notice</b>")
|
||||
title_label.setFont(QFont("Arial", 11, QFont.Weight.Bold))
|
||||
@@ -73,7 +73,7 @@ class UnsupportedGameDialog(QDialog):
|
||||
message_text.setStyleSheet("""
|
||||
QTextEdit {
|
||||
background-color: #23272e;
|
||||
color: #f8f9fa;
|
||||
color: #e0e0e0;
|
||||
border: 1px solid #444;
|
||||
border-radius: 6px;
|
||||
padding: 12px;
|
||||
@@ -191,10 +191,10 @@ class UnsupportedGameDialog(QDialog):
|
||||
self.setStyleSheet("""
|
||||
QDialog {
|
||||
background-color: #23272e;
|
||||
color: #f8f9fa;
|
||||
color: #e0e0e0;
|
||||
}
|
||||
QLabel {
|
||||
color: #f8f9fa;
|
||||
color: #e0e0e0;
|
||||
}
|
||||
""")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user