pub(crate) fn gpu_info_width(ui: &Ui, lines: &[GpuInfoLine]) -> f32Expand description
How wide the GPU-info panel has to be to keep every line on one row.
The facts are strings the device chose, and its own names for its limits run past fifty characters, so a fixed opening width would wrap them. Each line is laid out unwrapped as it will be drawn, the widest one sets the content width, and the window’s frame and the body’s scroll bar are added back on: the panel’s size, unlike the text’s, includes both.
A free function rather than part of the panel so a test can ask what width a given set of lines needs without drawing a pass.