fix: circular progressbar crashes on very small windows
This commit is contained in:
parent
147306d581
commit
b279d82240
1 changed files with 3 additions and 0 deletions
|
|
@ -177,6 +177,9 @@ where
|
||||||
|
|
||||||
let geometry = state.cache.draw(renderer, bounds.size(), |frame| {
|
let geometry = state.cache.draw(renderer, bounds.size(), |frame| {
|
||||||
let track_radius = frame.width() / 2.0 - self.bar_height;
|
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);
|
let track_path = canvas::Path::circle(frame.center(), track_radius);
|
||||||
|
|
||||||
frame.stroke(
|
frame.stroke(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue