From 6f790648025a0e834c1a59e2478707abefba57a6 Mon Sep 17 00:00:00 2001 From: Daniel Rojas Date: Mon, 25 Oct 2021 21:21:21 +0200 Subject: [PATCH] Optimize BOM bubble geometry --- src/wireviz/wv_graphviz.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/wireviz/wv_graphviz.py b/src/wireviz/wv_graphviz.py index 4b3b652..35b65ba 100644 --- a/src/wireviz/wv_graphviz.py +++ b/src/wireviz/wv_graphviz.py @@ -142,8 +142,24 @@ def bom_bubble(id) -> Table: if id is None: return None else: + # size and style of BOM bubble is optimized to be a rounded square, + # big enough to hold any two-digit ID without GraphViz warnings + text = id + # text = f'{id}' return Table( - Tr(Td(f" {id} ", border=0, cellpadding=0)), border=1, style="rounded" + Tr( + Td( + text, + border=1, + cellpadding=0, + fixedsize="true", + style="rounded", + height=20, + width=20, + # bgcolor="#000000", + ) + ), + border=0, )