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 Kilar
2026-09-01 14:02:09 -04:00
co-authored by Claude Opus 5
parent 450e3dfaaa
commit f55a960c53
2 changed files with 8 additions and 2 deletions
+1
View File
@@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file.
This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log...
## [unreleased][unreleased]
- Fixed `tools/ePassport` - the PERSONAL tab's personal-number caption wrapped, dropping the source onto a line of its own (@pkilar)
- Added `tools/ePassport` - EF_DG13 is decoded, and a Polish document's PESEL is shown as the personal number when it carries no EF_DG11 (@pkilar)
- Fixed `tools/ePassport` - a disabled button drew Kivy's banded disabled texture, which left its label unreadable (@pkilar)
- Fixed `hf 14b` - a card asking for a waiting time extension of 4 or more left the timeout at zero, so any ISO14443-B card needing time to answer looked like it had stopped responding (@pkilar)
+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"