Spaces:
Sleeping
Sleeping
Budget table column widths for wide host fonts (no more "Con... Tra...")
Browse filesGradio ellipsizes any header line that overflows its column, and the
Hugging Face Space renders the table in a wider monospace font than
local - "Contour Tracing" wrapped cleanly but each word was clipped.
Column widths now fit the longest header WORD in a wide monospace plus
the select-all checkbox (verified by injecting Courier New locally and
measuring every live header cell for overflow: none truncate), with the
roomy STL column trimmed so the table still fits a 1280px viewport
without horizontal scroll.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
app.py
CHANGED
|
@@ -4587,22 +4587,25 @@ def build_dynamic_demo() -> gr.Blocks:
|
|
| 4587 |
label="Shape Settings",
|
| 4588 |
elem_id="shape-settings-table",
|
| 4589 |
# Narrow fixed widths; two-word headers ("Pressure (psi)",
|
| 4590 |
-
# "Contour Tracing", ...) wrap to two lines via CSS.
|
|
|
|
|
|
|
|
|
|
| 4591 |
column_widths=[
|
| 4592 |
-
"
|
| 4593 |
-
"
|
| 4594 |
"62px", # X (mm)
|
| 4595 |
"62px", # Y (mm)
|
| 4596 |
"62px", # Z (mm)
|
| 4597 |
-
"
|
| 4598 |
-
"
|
| 4599 |
-
"
|
| 4600 |
-
"
|
| 4601 |
"104px", # Color
|
| 4602 |
-
"
|
| 4603 |
-
"
|
| 4604 |
-
"
|
| 4605 |
-
"
|
| 4606 |
],
|
| 4607 |
)
|
| 4608 |
with gr.Row():
|
|
|
|
| 4587 |
label="Shape Settings",
|
| 4588 |
elem_id="shape-settings-table",
|
| 4589 |
# Narrow fixed widths; two-word headers ("Pressure (psi)",
|
| 4590 |
+
# "Contour Tracing", ...) wrap to two lines via CSS. Each
|
| 4591 |
+
# column must fit its longest WORD in the widest host font
|
| 4592 |
+
# (the Space renders a wide monospace) plus the header
|
| 4593 |
+
# checkbox — too narrow and Gradio ellipsizes ("Con...").
|
| 4594 |
column_widths=[
|
| 4595 |
+
"64px", # Shape
|
| 4596 |
+
"154px", # STL
|
| 4597 |
"62px", # X (mm)
|
| 4598 |
"62px", # Y (mm)
|
| 4599 |
"62px", # Z (mm)
|
| 4600 |
+
"92px", # Pressure (psi)
|
| 4601 |
+
"62px", # Valve
|
| 4602 |
+
"68px", # Nozzle
|
| 4603 |
+
"58px", # Port
|
| 4604 |
"104px", # Color
|
| 4605 |
+
"72px", # Infill %
|
| 4606 |
+
"112px", # Contour Tracing
|
| 4607 |
+
"80px", # Lead In
|
| 4608 |
+
"68px", # Delete
|
| 4609 |
],
|
| 4610 |
)
|
| 4611 |
with gr.Row():
|