Skip to content

Commit 4bafb04

Browse files
committed
Recalculate the pilot name columns based on the pixel count.
1 parent 0f5f837 commit 4bafb04

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugins/greenieboard/reports.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,8 @@ async def render(self, server_name: str, num_rows: int, num_landings: int, squad
366366
tp_header = TextPath((0, 0), "Pilot", size=text_size, prop=font_props)
367367
header_width_points = tp_header.get_extents().width
368368

369-
# Convert points (1/72 inch) to inches
370-
pilot_column_width = max(header_width_points, max_name_width_points) / 50.0
369+
# 72 points = 1 inch. We add a 40% buffer (1.4x) for visual breathing room.
370+
pilot_column_width = (max(header_width_points, max_name_width_points) / 72.0) * 1.4
371371

372372
padding = 1.0 # Padding between columns
373373
fig_width = pilot_column_width + padding + (

0 commit comments

Comments
 (0)