Small fix 0.4.2
Python application / build (push) Has been cancelled

- Update gitignore
- Rewrite blocks text
- Add custom "Отступы от края страницы"
This commit is contained in:
Igor20264
2026-09-05 09:47:57 +03:00
parent 2ba6fe2673
commit 8508d04bbc
4 changed files with 21 additions and 3 deletions
+16
View File
@@ -15,6 +15,22 @@ MARGIN_RIGHT = Mm(10)
MARGIN_TOP = Mm(20)
MARGIN_BOTTOM = Mm(20)
# mirea / pis_custom — 30/10/20/20; paco_custom — форма ПАЦО 20/20/20/20
MARGIN_PRESETS = {
"mirea": (Mm(30), Mm(10), Mm(20), Mm(20)),
"pis_custom": (Mm(30), Mm(10), Mm(20), Mm(20)),
}
def apply_margin_preset(preset: str) -> None:
"""Switch active page margins used by apply_section_geometry / content_size."""
global MARGIN_LEFT, MARGIN_RIGHT, MARGIN_TOP, MARGIN_BOTTOM
left, right, top, bottom = MARGIN_PRESETS.get(preset, MARGIN_PRESETS["mirea"])
MARGIN_LEFT = left
MARGIN_RIGHT = right
MARGIN_TOP = top
MARGIN_BOTTOM = bottom
A4_SHORT = Mm(210)
A4_LONG = Mm(297)