Refactor box rendering for better alignment
- Simplified color code placement in box headers - Improved padding logic for side-by-side display - Better handling of content padding within boxes - Deployed and verified on Pi
This commit is contained in:
@@ -269,7 +269,7 @@ class StatusDisplay:
|
||||
# Draw separate boxes for each nail side-by-side
|
||||
lines.append("{}┌──────────────────────────┐ ┌──────────────────────────┐{}".format(
|
||||
Colors.CYAN, Colors.RESET))
|
||||
lines.append("{}│ {}NAIL 1{} │ │ {}NAIL 2{} │{}".format(
|
||||
lines.append("{}│ {}NAIL 1{:<17}│ │ {}NAIL 2{:<17}│{}".format(
|
||||
Colors.CYAN,
|
||||
Colors.BRIGHT_RED + Colors.BOLD,
|
||||
Colors.CYAN,
|
||||
@@ -282,9 +282,14 @@ class StatusDisplay:
|
||||
|
||||
for n1_line, n2_line in zip(nail1_lines, nail2_lines):
|
||||
# Pad lines to 24 chars for each box
|
||||
left = "│ {:<22} │".format(n1_line[:22])
|
||||
right = "│ {:<22} │".format(n2_line[:22])
|
||||
lines.append("{}{} {}{}".format(left, Colors.CYAN, right, Colors.RESET))
|
||||
n1_padded = "{:<24}".format(n1_line[:24])
|
||||
n2_padded = "{:<24}".format(n2_line[:24])
|
||||
lines.append("{}│ {} │ │ {} │{}".format(
|
||||
Colors.CYAN,
|
||||
n1_padded,
|
||||
n2_padded,
|
||||
Colors.RESET
|
||||
))
|
||||
|
||||
# Footer
|
||||
lines.append("{}└──────────────────────────┘ └──────────────────────────┘{}".format(
|
||||
|
||||
Reference in New Issue
Block a user