ePassport: keep the personal number caption on one line

"Personal number (from DG13)" renders 203px wide and the caption column is
dp(190), so it wrapped and left the source sitting on a line of its own.
Without the "from" it comes to 167px and fits, with room to spare over the
140px of the longest caption already in that tab.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Paul KilarandClaude Opus 5 committed 2026-09-01 14:02:09 -04:00
1 parent 450e3dfaaa
commit f55a960c53
2 files changed
+8 -2

No files matched your search

+7 -2
View File
@@ -51,10 +51,15 @@ class DetailPage(TabPage):
def _personal_number_label(record) -> str:
"""Name the source when it is not DG11, so the row is not misread."""
"""Name the source when it is not DG11, so the row is not misread.
Without the "from" it fits the caption column: dp(190) holds 167px of
"Personal number (DG13)" but not the 203px the longer wording needs, and
a caption that wraps drops the source onto a line of its own.
"""
source = record.personal_number_source
if source in ("MRZ", "DG13"):
return f"Personal number (from {source})"
return f"Personal number ({source})"
return "Personal number"