V3.6.0 — Demonter pages, masquage visuel, regles, bleeds, corrections

- Demonter les pages : couper en 2 sans reordonner (sous Delivretiser)
- Masquage visuel : selection au curseur sur l'apercu + plage de pages
- Regles horizontale/verticale en mm (menu Affichage)
- Fonds perdus : filigrane rouge pour visualiser les bleeds
- Reperes de coupe : marques a l'exterieur (page agrandie), 2 traits/coin
- Numerotation : couleur configurable via selecteur
- Decalage : Trim & Shift renomme en francais, creep -> chasse
- Recadrages multiples cumulatifs (plages differentes)
- Fix spinbox format personnalise (fleches aleatoires)
- Fix combo livret : option Automatique preservee

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jules
2026-03-29 22:12:54 +02:00
parent f7ad806b26
commit 202834a794
13 changed files with 675 additions and 113 deletions

View File

@@ -2,7 +2,9 @@
from PyQt6.QtWidgets import (QDialog, QVBoxLayout, QHBoxLayout, QLabel,
QGroupBox, QComboBox, QSpinBox, QLineEdit,
QDialogButtonBox, QDoubleSpinBox)
QDialogButtonBox, QDoubleSpinBox, QPushButton,
QColorDialog)
from PyQt6.QtGui import QColor
from reportlab.lib.units import mm
@@ -11,6 +13,7 @@ class PageNumbersDialog(QDialog):
super().__init__(parent)
self.setWindowTitle("Numerotation de pages")
self.setMinimumWidth(400)
self._color = QColor(0, 0, 0)
self._setup_ui()
def _setup_ui(self):
@@ -45,6 +48,17 @@ class PageNumbersDialog(QDialog):
fl.addWidget(self.spin_size)
layout.addWidget(grp_font)
# Couleur
color_layout = QHBoxLayout()
color_layout.addWidget(QLabel("Couleur :"))
self.btn_color = QPushButton()
self.btn_color.setFixedSize(60, 28)
self._update_color_button()
self.btn_color.clicked.connect(self._pick_color)
color_layout.addWidget(self.btn_color)
color_layout.addStretch()
layout.addLayout(color_layout)
# Texte
grp_text = QGroupBox("Texte")
tl = QHBoxLayout(grp_text)
@@ -100,6 +114,17 @@ class PageNumbersDialog(QDialog):
buttons.rejected.connect(self.reject)
layout.addWidget(buttons)
def _pick_color(self):
color = QColorDialog.getColor(self._color, self, "Couleur de la numerotation")
if color.isValid():
self._color = color
self._update_color_button()
def _update_color_button(self):
self.btn_color.setStyleSheet(
f"background-color: {self._color.name()}; border: 1px solid #999; border-radius: 4px;"
)
def get_settings(self):
apply_map = {
"Toutes les pages": "all",
@@ -110,7 +135,7 @@ class PageNumbersDialog(QDialog):
"position": self.combo_pos.currentText(),
"font_name": self.combo_font.currentText(),
"font_size": self.spin_size.value(),
"color": (0, 0, 0),
"color": (self._color.redF(), self._color.greenF(), self._color.blueF()),
"prefix": self.edit_prefix.text(),
"suffix": self.edit_suffix.text(),
"start_number": self.spin_start.value(),