edof 4.2.4__tar.gz → 4.2.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {edof-4.2.4 → edof-4.2.5}/PKG-INFO +1 -1
- {edof-4.2.4 → edof-4.2.5}/edof/_apps/editor.py +46 -18
- {edof-4.2.4 → edof-4.2.5}/edof/version.py +1 -1
- {edof-4.2.4 → edof-4.2.5}/edof.egg-info/PKG-INFO +1 -1
- {edof-4.2.4 → edof-4.2.5}/pyproject.toml +1 -1
- {edof-4.2.4 → edof-4.2.5}/LICENSE +0 -0
- {edof-4.2.4 → edof-4.2.5}/README.md +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/__init__.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/_apps/__init__.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/_apps/_assoc_dialog.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/_apps/assets/__init__.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/_apps/assets/icons/__init__.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/_apps/assets/icons/edof-document-512.png +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/_apps/assets/icons/edof-document.icns +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/_apps/assets/icons/edof-document.ico +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/_apps/assets/icons/edof-document.png +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/_apps/assets/icons/edof-editor-512.png +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/_apps/assets/icons/edof-editor.icns +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/_apps/assets/icons/edof-editor.ico +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/_apps/assets/icons/edof-editor.png +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/_apps/assets/icons/edof-viewer-512.png +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/_apps/assets/icons/edof-viewer.icns +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/_apps/assets/icons/edof-viewer.ico +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/_apps/assets/icons/edof-viewer.png +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/_apps/cli.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/_apps/edof_text_editor.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/_apps/file_assoc.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/_apps/shortcuts.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/_apps/viewer.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/api/__init__.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/api/commands.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/crypto/__init__.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/crypto/document_protection.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/crypto/encryption.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/crypto/permissions.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/editor_lang/en.json +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/engine/__init__.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/engine/color.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/engine/debug_log.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/engine/document_flow.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/engine/document_paginate.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/engine/renderer.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/engine/text_engine.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/engine/text_layout.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/engine/textbox_flow.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/engine/transform.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/exceptions.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/export/__init__.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/export/bitmap.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/export/legacy_v3.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/export/pdf.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/export/pdf_writer.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/export/printer.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/export/svg.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/format/__init__.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/format/document.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/format/document_body.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/format/document_boxes.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/format/objects.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/format/serializer.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/format/styles.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/format/svg_io.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/format/variables.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/gui/__init__.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/gui/pyqt6_widget.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/gui/tkinter_canvas.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/interop/__init__.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/interop/docx_io.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/py.typed +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/units.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/utils/__init__.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/utils/compat.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/utils/legacy_v2.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/utils/pdf_import.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/utils/qr.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/utils/rtf.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof/utils/safe_eval.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof.egg-info/SOURCES.txt +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof.egg-info/dependency_links.txt +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof.egg-info/entry_points.txt +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof.egg-info/requires.txt +0 -0
- {edof-4.2.4 → edof-4.2.5}/edof.egg-info/top_level.txt +0 -0
- {edof-4.2.4 → edof-4.2.5}/setup.cfg +0 -0
- {edof-4.2.4 → edof-4.2.5}/tests/test_v310.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/tests/test_v400.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/tests/test_v401.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/tests/test_v402.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/tests/test_v403.py +0 -0
- {edof-4.2.4 → edof-4.2.5}/tests/test_v410.py +0 -0
|
@@ -1232,7 +1232,7 @@ class EdofCanvas(QGraphicsView):
|
|
|
1232
1232
|
sp_size = FocusKeepingSpinBox()
|
|
1233
1233
|
sp_size._editor_ref = self # canvas — has _refocus_inline()
|
|
1234
1234
|
sp_size.setRange(0.3, 350.0)
|
|
1235
|
-
sp_size.setSingleStep(0.
|
|
1235
|
+
sp_size.setSingleStep(0.1)
|
|
1236
1236
|
sp_size.setDecimals(2)
|
|
1237
1237
|
sp_size.setSuffix(" mm")
|
|
1238
1238
|
sp_size.setMinimumWidth(110); sp_size.setMaximumWidth(140)
|
|
@@ -5975,9 +5975,11 @@ class PropPanel(QWidget):
|
|
|
5975
5975
|
self._qt.timeout.connect(self._live_qr)
|
|
5976
5976
|
self._setup()
|
|
5977
5977
|
|
|
5978
|
-
def _dspin(self,lo=-99999,hi=99999,dec=2,step=0.
|
|
5978
|
+
def _dspin(self,lo=-99999,hi=99999,dec=2,step=0.1,suffix=""):
|
|
5979
5979
|
# v4.1.14: arrows now painted by our QDoubleSpinBox subclass at the
|
|
5980
5980
|
# top of this file, so no Fusion-style hack is needed here.
|
|
5981
|
+
# v4.2.5: default to 0.01 mm precision (dec=2) and a 0.1 mm arrow step
|
|
5982
|
+
# (was 0.5) so mm fields no longer jump by half a millimetre.
|
|
5981
5983
|
s=QDoubleSpinBox(); s.setRange(lo,hi); s.setDecimals(dec); s.setSingleStep(step)
|
|
5982
5984
|
if suffix: s.setSuffix(suffix)
|
|
5983
5985
|
return s
|
|
@@ -6368,7 +6370,7 @@ class PropPanel(QWidget):
|
|
|
6368
6370
|
hs.addWidget(self.btn_stroke); hs.addWidget(self.sp_sw); hs.addStretch()
|
|
6369
6371
|
fl.addRow(t('prop_stroke'),rs)
|
|
6370
6372
|
|
|
6371
|
-
self.sp_cr=self._dspin(lo=0,hi=200,dec=
|
|
6373
|
+
self.sp_cr=self._dspin(lo=0,hi=200,dec=2,suffix=" mm")
|
|
6372
6374
|
self.sp_cr.editingFinished.connect(lambda:self._aa_obj('corner_radius',self.sp_cr.value()))
|
|
6373
6375
|
fl.addRow("Corner radius:",self.sp_cr)
|
|
6374
6376
|
|
|
@@ -6614,7 +6616,7 @@ class PropPanel(QWidget):
|
|
|
6614
6616
|
self.btn_table_border_color = QPushButton(); self.btn_table_border_color.setFixedSize(28, 22)
|
|
6615
6617
|
self.btn_table_border_color.setToolTip("Border color")
|
|
6616
6618
|
self.btn_table_border_color.clicked.connect(self._pick_table_border_color)
|
|
6617
|
-
self.sp_table_border_w = self._dspin(lo=0.1, hi=20, dec=
|
|
6619
|
+
self.sp_table_border_w = self._dspin(lo=0.1, hi=20, dec=2, step=0.1, suffix=" mm")
|
|
6618
6620
|
self.sp_table_border_w.setFixedWidth(80)
|
|
6619
6621
|
self.sp_table_border_w.setToolTip("Border width")
|
|
6620
6622
|
self.sp_table_border_w.editingFinished.connect(self._on_table_border_change)
|
|
@@ -7491,7 +7493,7 @@ class PropPanel(QWidget):
|
|
|
7491
7493
|
s.setMinimumWidth(160)
|
|
7492
7494
|
return s
|
|
7493
7495
|
|
|
7494
|
-
def _spin(lo, hi, val, suffix='', dec=
|
|
7496
|
+
def _spin(lo, hi, val, suffix='', dec=2):
|
|
7495
7497
|
sp = QDoubleSpinBox(); sp.setRange(lo, hi); sp.setValue(val); sp.setDecimals(dec); sp.setSuffix(suffix)
|
|
7496
7498
|
sp.setFixedWidth(110)
|
|
7497
7499
|
return sp
|
|
@@ -8946,7 +8948,7 @@ class EdofEditor(QMainWindow):
|
|
|
8946
8948
|
v.addWidget(mode_grp)
|
|
8947
8949
|
|
|
8948
8950
|
# Preset selection
|
|
8949
|
-
pres_grp=QGroupBox("Size")
|
|
8951
|
+
pres_grp=QGroupBox("Size (a preset just fills the W / H / DPI fields below)")
|
|
8950
8952
|
pl=QVBoxLayout(pres_grp)
|
|
8951
8953
|
list_presets=QListWidget()
|
|
8952
8954
|
# Paper sizes
|
|
@@ -9005,12 +9007,44 @@ class EdofEditor(QMainWindow):
|
|
|
9005
9007
|
cust_w=QWidget(); hcw=QHBoxLayout(cust_w); hcw.setContentsMargins(8,0,0,0)
|
|
9006
9008
|
sp_cw=QDoubleSpinBox(); sp_cw.setRange(1, 5000); sp_cw.setValue(210); sp_cw.setSuffix(" mm")
|
|
9007
9009
|
sp_ch=QDoubleSpinBox(); sp_ch.setRange(1, 5000); sp_ch.setValue(297); sp_ch.setSuffix(" mm")
|
|
9008
|
-
sp_dpi=QSpinBox(); sp_dpi.setRange(
|
|
9010
|
+
sp_dpi=QSpinBox(); sp_dpi.setRange(1, 9600); sp_dpi.setValue(300); sp_dpi.setSuffix(" DPI")
|
|
9011
|
+
sp_dpi.setToolTip("Custom DPI is respected: once you change it, picking a "
|
|
9012
|
+
"preset will not overwrite it.")
|
|
9009
9013
|
hcw.addWidget(QLabel("W:")); hcw.addWidget(sp_cw)
|
|
9010
9014
|
hcw.addWidget(QLabel("H:")); hcw.addWidget(sp_ch)
|
|
9011
9015
|
hcw.addWidget(QLabel("DPI:")); hcw.addWidget(sp_dpi)
|
|
9012
9016
|
v.addWidget(cust_w)
|
|
9013
9017
|
|
|
9018
|
+
# v4.2.5: presets just PREFILL these fields; the document is always
|
|
9019
|
+
# created from the W/H/DPI fields below, so whatever the user types
|
|
9020
|
+
# wins (previously a preset row overrode the typed values). The DPI is
|
|
9021
|
+
# only suggested by a preset until the user sets their own value, then
|
|
9022
|
+
# it is left untouched so a custom DPI sticks.
|
|
9023
|
+
_dpi_touched = [False]
|
|
9024
|
+
_prog = [False]
|
|
9025
|
+
def _on_dpi_changed(_v):
|
|
9026
|
+
if not _prog[0]:
|
|
9027
|
+
_dpi_touched[0] = True
|
|
9028
|
+
sp_dpi.valueChanged.connect(_on_dpi_changed)
|
|
9029
|
+
|
|
9030
|
+
def _prefill_from_preset(cur, _prev=None):
|
|
9031
|
+
if cur is None:
|
|
9032
|
+
return
|
|
9033
|
+
data = cur.data(Qt.ItemDataRole.UserRole)
|
|
9034
|
+
if not data:
|
|
9035
|
+
return
|
|
9036
|
+
kind, pw, ph = data
|
|
9037
|
+
if kind == "custom":
|
|
9038
|
+
return # keep whatever the user has typed
|
|
9039
|
+
_prog[0] = True
|
|
9040
|
+
sp_cw.setValue(round(float(pw), 2))
|
|
9041
|
+
sp_ch.setValue(round(float(ph), 2))
|
|
9042
|
+
if not _dpi_touched[0]:
|
|
9043
|
+
sp_dpi.setValue(300 if kind == "paper" else 72)
|
|
9044
|
+
_prog[0] = False
|
|
9045
|
+
list_presets.currentItemChanged.connect(_prefill_from_preset)
|
|
9046
|
+
_prefill_from_preset(list_presets.currentItem())
|
|
9047
|
+
|
|
9014
9048
|
# v4.1.3: Background option
|
|
9015
9049
|
from PyQt6.QtWidgets import QGroupBox as _QGB
|
|
9016
9050
|
bg_grp = _QGB("Background")
|
|
@@ -9041,19 +9075,13 @@ class EdofEditor(QMainWindow):
|
|
|
9041
9075
|
bb.accepted.connect(dlg.accept); bb.rejected.connect(dlg.reject); v.addWidget(bb)
|
|
9042
9076
|
if dlg.exec()!=QDialog.DialogCode.Accepted: return
|
|
9043
9077
|
|
|
9044
|
-
# Resolve size
|
|
9078
|
+
# Resolve size — ALWAYS from the W/H/DPI fields (presets only prefill
|
|
9079
|
+
# them), so the user's typed values are never silently overridden.
|
|
9045
9080
|
item = list_presets.currentItem()
|
|
9046
|
-
|
|
9081
|
+
w = sp_cw.value(); h = sp_ch.value()
|
|
9082
|
+
dpi = sp_dpi.value()
|
|
9083
|
+
if w <= 0 or h <= 0:
|
|
9047
9084
|
return
|
|
9048
|
-
data = item.data(Qt.ItemDataRole.UserRole)
|
|
9049
|
-
if not data:
|
|
9050
|
-
return
|
|
9051
|
-
kind, w, h = data
|
|
9052
|
-
if kind == "custom":
|
|
9053
|
-
w = sp_cw.value(); h = sp_ch.value()
|
|
9054
|
-
dpi = sp_dpi.value()
|
|
9055
|
-
else:
|
|
9056
|
-
dpi = 300 if kind == "paper" else 72 # video defaults to 72 DPI
|
|
9057
9085
|
|
|
9058
9086
|
title = "Untitled"
|
|
9059
9087
|
new_doc = edof.new(width=w, height=h, title=title, dpi=dpi)
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "edof"
|
|
7
|
-
version = "4.2.
|
|
7
|
+
version = "4.2.5"
|
|
8
8
|
description = "Easy Document Format – programmatic document creation, editing and export with vector PDF, rich text, tables and PDF import"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = { file = "LICENSE" }
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|