`slot_width` is the per-group horizontal slice; `box_width` is the rendered box width within the slot, narrowed when grouped so adjacent boxes don't touch.
(n_groups: usize)
| 68 | /// `slot_width` is the per-group horizontal slice; `box_width` is the rendered |
| 69 | /// box width within the slot, narrowed when grouped so adjacent boxes don't touch. |
| 70 | fn box_slot_widths(n_groups: usize) -> (f64, f64) { |
| 71 | if n_groups > 1 { |
| 72 | let slot = 0.8 / n_groups as f64; |
| 73 | (slot, slot * 0.5) |
| 74 | } else { |
| 75 | (0.5, 0.5) |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | /// Detect if any trace requests horizontal orientation. |
| 80 | fn is_horizontal(traces: &[TraceIR]) -> bool { |