Fix drawing empty Quad on empty ProgressBar
This commit is contained in:
parent
cae4463e83
commit
89b1ac6eac
1 changed files with 17 additions and 13 deletions
|
|
@ -29,20 +29,24 @@ impl progress_bar::Renderer for Renderer {
|
|||
}],
|
||||
};
|
||||
|
||||
let bar = Primitive::Quad {
|
||||
bounds: Rectangle {
|
||||
width: active_progress_width,
|
||||
..bounds
|
||||
},
|
||||
background: style.bar,
|
||||
border_radius: style.border_radius,
|
||||
border_width: 0,
|
||||
border_color: Color::TRANSPARENT,
|
||||
};
|
||||
|
||||
(
|
||||
Primitive::Group {
|
||||
primitives: vec![background, bar],
|
||||
if active_progress_width > 0.0 {
|
||||
let bar = Primitive::Quad {
|
||||
bounds: Rectangle {
|
||||
width: active_progress_width,
|
||||
..bounds
|
||||
},
|
||||
background: style.bar,
|
||||
border_radius: style.border_radius,
|
||||
border_width: 0,
|
||||
border_color: Color::TRANSPARENT,
|
||||
};
|
||||
|
||||
Primitive::Group {
|
||||
primitives: vec![background, bar],
|
||||
}
|
||||
} else {
|
||||
background
|
||||
},
|
||||
MouseCursor::OutOfBounds,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue