diff --git a/app/main_window.py b/app/main_window.py index 5ebb5ff..058265a 100644 --- a/app/main_window.py +++ b/app/main_window.py @@ -36,6 +36,13 @@ class MainWindow(QMainWindow): super().__init__() self.setWindowTitle("Copydev Imposing Tool") self.setMinimumSize(1000, 700) + + # Icone de la fenetre + from PyQt6.QtGui import QIcon + icon_path = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), + "resources", "logo.png") + if os.path.exists(icon_path): + self.setWindowIcon(QIcon(icon_path)) self._current_file = None self._result_file = None self._setup_menu() @@ -331,11 +338,75 @@ class MainWindow(QMainWindow): QMessageBox.critical(self, "Erreur", str(e)) def _show_about(self): - QMessageBox.about( - self, - "A propos", - "Copydev Imposing Tool\n\n" - "Outil d'imposition PDF\n" - "Remplace Quite Imposing Plus\n\n" - "Copydev 2026" + from PyQt6.QtWidgets import QDialog, QVBoxLayout, QHBoxLayout, QLabel, QDialogButtonBox + from PyQt6.QtGui import QPixmap + from PyQt6.QtCore import Qt + + dlg = QDialog(self) + dlg.setWindowTitle("A propos") + dlg.setFixedSize(480, 380) + layout = QVBoxLayout(dlg) + + # Logo + logo_label = QLabel() + logo_path = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), + "resources", "logo.png") + if os.path.exists(logo_path): + pixmap = QPixmap(logo_path).scaled(120, 120, Qt.AspectRatioMode.KeepAspectRatio, + Qt.TransformationMode.SmoothTransformation) + logo_label.setPixmap(pixmap) + logo_label.setAlignment(Qt.AlignmentFlag.AlignCenter) + layout.addWidget(logo_label) + + # Titre + title = QLabel("

Copydev Imposing Tool

") + title.setAlignment(Qt.AlignmentFlag.AlignCenter) + layout.addWidget(title) + + # Version + version = QLabel("Version 1.0.0") + version.setAlignment(Qt.AlignmentFlag.AlignCenter) + version.setStyleSheet("color: #666;") + layout.addWidget(version) + + layout.addSpacing(10) + + # Description + desc = QLabel( + "Outil professionnel d'imposition PDF.\n" + "Creation de livrets, n-up, repetition, imposition manuelle,\n" + "numerotation, masquage et fonds perdus." ) + desc.setAlignment(Qt.AlignmentFlag.AlignCenter) + desc.setWordWrap(True) + layout.addWidget(desc) + + layout.addSpacing(15) + + # Coordonnees + contact = QLabel( + '

' + 'CopyDev
' + 'Jules Dubois
' + 'contact@copydev.fr
' + 'www.copydev.fr' + '

' + ) + contact.setAlignment(Qt.AlignmentFlag.AlignCenter) + contact.setOpenExternalLinks(True) + layout.addWidget(contact) + + layout.addSpacing(5) + + # Copyright + copy_label = QLabel("© 2026 CopyDev — Tous droits reserves") + copy_label.setAlignment(Qt.AlignmentFlag.AlignCenter) + copy_label.setStyleSheet("color: #999; font-size: 11px;") + layout.addWidget(copy_label) + + # Bouton Fermer + buttons = QDialogButtonBox(QDialogButtonBox.StandardButton.Close) + buttons.rejected.connect(dlg.close) + layout.addWidget(buttons) + + dlg.exec() diff --git a/main.py b/main.py index f5383d6..a21bd90 100644 --- a/main.py +++ b/main.py @@ -42,6 +42,12 @@ def main(): app.setApplicationName("Copydev Imposing Tool") app.setOrganizationName("Copydev") + # Icone application + from PyQt6.QtGui import QIcon + icon_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "resources", "logo.png") + if os.path.exists(icon_path): + app.setWindowIcon(QIcon(icon_path)) + if not _check_auth(): sys.exit(1) diff --git a/resources/icon.png b/resources/icon.png new file mode 100644 index 0000000..4561ac8 Binary files /dev/null and b/resources/icon.png differ diff --git a/resources/logo.png b/resources/logo.png new file mode 100755 index 0000000..30a61eb Binary files /dev/null and b/resources/logo.png differ