fix: circular progressbar crashes on very small windows

This commit is contained in:
Hojjat 2026-05-20 00:32:14 -06:00 committed by Ashley Wulber
parent 147306d581
commit b279d82240

View file

@ -177,6 +177,9 @@ where
let geometry = state.cache.draw(renderer, bounds.size(), |frame| {
let track_radius = frame.width() / 2.0 - self.bar_height;
if track_radius <= 0.0 {
return;
}
let track_path = canvas::Path::circle(frame.center(), track_radius);
frame.stroke(