CyGuy8 Claude Fable 5 commited on
Commit
4598c89
·
1 Parent(s): 6353562

Align the Raster Pattern and Sweep Buffer input boxes

Browse files

The Sweep Buffer's hint line pushed its box below the Raster Pattern
dropdown. Both inputs now carry a hint (Lead In Raster Lines gets one
too - it was its row's odd one out), and the row is bottom-aligned via
CSS so the boxes stay level even when the hint text wraps differently
in the Space's wider font.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

Files changed (1) hide show
  1. app.py +9 -2
app.py CHANGED
@@ -290,6 +290,12 @@ APP_CSS = """
290
  font-weight: 500;
291
  }
292
 
 
 
 
 
 
 
293
  /* Narrower columns: header labels ("Pressure (psi)", "Contour Tracing", ...)
294
  wrap to two lines instead of forcing single-line column widths. Wrapping
295
  happens ONLY at spaces — words never break mid-word (columns grow to fit
@@ -4680,13 +4686,14 @@ def build_dynamic_demo() -> gr.Blocks:
4680
  """
4681
  )
4682
  gcode_pressure_ramp_enabled = gr.Checkbox(label="Increase Pressure Each Layer", value=True)
4683
- with gr.Row():
4684
  gcode_raster_pattern = gr.Dropdown(
4685
  label="Raster Pattern",
4686
  choices=list(RASTER_PATTERN_CHOICES),
4687
  value=RASTER_PATTERN_SAME_DIRECTION,
4688
  allow_custom_value=False,
4689
  scale=3,
 
4690
  )
4691
  gcode_sweep_buffer = gr.Number(
4692
  label="Sweep Buffer (mm)",
@@ -4708,7 +4715,7 @@ def build_dynamic_demo() -> gr.Blocks:
4708
  step=0.1,
4709
  info="Distance between the shape and the purge patch.",
4710
  )
4711
- gcode_lead_in_lines = gr.Number(label="Lead In Raster Lines", value=3, minimum=1, step=1)
4712
  with gr.Row():
4713
  gcode_lead_in_direction = gr.Dropdown(
4714
  label="Lead In Position",
 
290
  font-weight: 500;
291
  }
292
 
293
+ /* Raster Pattern + Sweep Buffer: bottom-align so the input boxes line up
294
+ even when their label/hint lines wrap differently. */
295
+ #gcode-raster-row {
296
+ align-items: end;
297
+ }
298
+
299
  /* Narrower columns: header labels ("Pressure (psi)", "Contour Tracing", ...)
300
  wrap to two lines instead of forcing single-line column widths. Wrapping
301
  happens ONLY at spaces — words never break mid-word (columns grow to fit
 
4686
  """
4687
  )
4688
  gcode_pressure_ramp_enabled = gr.Checkbox(label="Increase Pressure Each Layer", value=True)
4689
+ with gr.Row(elem_id="gcode-raster-row"):
4690
  gcode_raster_pattern = gr.Dropdown(
4691
  label="Raster Pattern",
4692
  choices=list(RASTER_PATTERN_CHOICES),
4693
  value=RASTER_PATTERN_SAME_DIRECTION,
4694
  allow_custom_value=False,
4695
  scale=3,
4696
+ info="Tool path style used for every layer.",
4697
  )
4698
  gcode_sweep_buffer = gr.Number(
4699
  label="Sweep Buffer (mm)",
 
4715
  step=0.1,
4716
  info="Distance between the shape and the purge patch.",
4717
  )
4718
+ gcode_lead_in_lines = gr.Number(label="Lead In Raster Lines", value=3, minimum=1, step=1, info="Number of purge strokes in the patch.")
4719
  with gr.Row():
4720
  gcode_lead_in_direction = gr.Dropdown(
4721
  label="Lead In Position",