From dabfe06e115a6b34c9472b5454b27c35bd72967d Mon Sep 17 00:00:00 2001 From: Stefano Baldo Date: Fri, 5 Jun 2026 14:09:24 -0300 Subject: [PATCH] fix: align global and hierarchical labels vertically centered --- python/commands/wire_manager.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/python/commands/wire_manager.py b/python/commands/wire_manager.py index db20d08..8c362b4 100644 --- a/python/commands/wire_manager.py +++ b/python/commands/wire_manager.py @@ -318,6 +318,10 @@ class WireManager: # Orientation-aware justify: KiCAD flips horizontal alignment for 180°/270° justify_h = Symbol("right") if orientation in (180, 270) else Symbol("left") + justify_expr = [Symbol("justify"), justify_h] + if label_type == "label": + justify_expr.append(Symbol("bottom")) + label_sexp = [ Symbol(label_type), text, @@ -325,7 +329,7 @@ class WireManager: [ Symbol("effects"), [Symbol("font"), [Symbol("size"), 1.27, 1.27]], - [Symbol("justify"), justify_h, Symbol("bottom")], + justify_expr, ], [Symbol("uuid"), str(uuid.uuid4())], ]