Skip to content

Commit 81b7e7f

Browse files
authored
Make the default spinner more high-res (emilk#7044)
Make it nice and smooth when big
1 parent 773232b commit 81b7e7f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/egui/src/widgets/spinner.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ impl Spinner {
4343
.color
4444
.unwrap_or_else(|| ui.visuals().strong_text_color());
4545
let radius = (rect.height() / 2.0) - 2.0;
46-
let n_points = 20;
46+
let n_points = (radius.round() as u32).clamp(8, 128);
4747
let time = ui.input(|i| i.time);
4848
let start_angle = time * std::f64::consts::TAU;
4949
let end_angle = start_angle + 240f64.to_radians() * time.sin();

0 commit comments

Comments
 (0)