Vertikale Ausrichtung für Textfelder ergänzt; default: top

This commit is contained in:
2026-04-17 14:44:30 +02:00
parent 5564c06d5c
commit 4b842bf635
3 changed files with 35 additions and 4 deletions
+5 -2
View File
@@ -351,7 +351,7 @@ class PrintLayoutBaufreigabe(PrintLayout):
# Positionen werden bewusst als feste Werte gesetzt und bei Bedarf manuell angepasst.
labels = [
("Teilnehmergemeinschaft [%@sn_bezeichnung %] [%@sn_name %]", 14.0, -84.0, 74.0, 8.0, "Format_1", "Herausgeber"),
("Teilnehmergemeinschaft [%@sn_bezeichnung %] [%@sn_name %]", 14.0, -82.0, 74.0, 8.0, "Format_1", "Herausgeber","Bottom"),
("[% @sn_bezeichnung %]", 14.0, -75.0, 74.0, 4.0, "Format_1", "Bezeichnung_Flurbereinigung"),
("[% @sn_name %]", 14.0, -64.0, 74.0, 5.0, "Format_2", "Name_Flurbereinigung"),
("[% @sn_gemeinden %]", 14.0, -56.0, 74.0, 4.0, "Format_1", "Stadt_Gemeinde"),
@@ -370,7 +370,9 @@ class PrintLayoutBaufreigabe(PrintLayout):
]
for text, rx, ry, w, h, fmt, obj_name in labels:
for entry in labels:
text, rx, ry, w, h, fmt, obj_name = entry[:7]
v_align = entry[7] if len(entry) > 7 else "top"
x, y = _coords_rel_untere_rechte_ecke(rx, ry)
self.add_text_label(
text,
@@ -381,6 +383,7 @@ class PrintLayoutBaufreigabe(PrintLayout):
text_format=fmt,
expression_enabled=True,
object_name=obj_name,
v_align=v_align,
)
def _calc_atlas_margin_percent(self, map_width_mm: float, map_height_mm: float) -> float: