fix: align global and hierarchical labels vertically centered
This commit is contained in:
@@ -318,6 +318,10 @@ class WireManager:
|
|||||||
# Orientation-aware justify: KiCAD flips horizontal alignment for 180°/270°
|
# Orientation-aware justify: KiCAD flips horizontal alignment for 180°/270°
|
||||||
justify_h = Symbol("right") if orientation in (180, 270) else Symbol("left")
|
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 = [
|
label_sexp = [
|
||||||
Symbol(label_type),
|
Symbol(label_type),
|
||||||
text,
|
text,
|
||||||
@@ -325,7 +329,7 @@ class WireManager:
|
|||||||
[
|
[
|
||||||
Symbol("effects"),
|
Symbol("effects"),
|
||||||
[Symbol("font"), [Symbol("size"), 1.27, 1.27]],
|
[Symbol("font"), [Symbol("size"), 1.27, 1.27]],
|
||||||
[Symbol("justify"), justify_h, Symbol("bottom")],
|
justify_expr,
|
||||||
],
|
],
|
||||||
[Symbol("uuid"), str(uuid.uuid4())],
|
[Symbol("uuid"), str(uuid.uuid4())],
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user