Make the default spinner more high-res (#7044)

Make it nice and smooth when big
This commit is contained in:
Emil Ernerfeldt 2025-05-11 22:15:07 +02:00 committed by GitHub
parent 773232b139
commit 81b7e7f05a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -43,7 +43,7 @@ impl Spinner {
.color
.unwrap_or_else(|| ui.visuals().strong_text_color());
let radius = (rect.height() / 2.0) - 2.0;
let n_points = 20;
let n_points = (radius.round() as u32).clamp(8, 128);
let time = ui.input(|i| i.time);
let start_angle = time * std::f64::consts::TAU;
let end_angle = start_angle + 240f64.to_radians() * time.sin();