mirror of
https://github.com/elkowar/eww.git
synced 2024-09-11 11:56:48 +03:00
Fix circular progress crashing when value is out of range
fixes #682, fixes #854
This commit is contained in:
parent
44fa18367e
commit
d42bb08e84
@ -999,9 +999,9 @@ fn build_circular_progress_bar(bargs: &mut BuilderArgs) -> Result<CircProg> {
|
||||
let w = CircProg::new();
|
||||
def_widget!(bargs, _g, w, {
|
||||
// @prop value - the value, between 0 - 100
|
||||
prop(value: as_f64) { w.set_property("value", value); },
|
||||
// @prop start-at - the angle that the circle should start at
|
||||
prop(start_at: as_f64) { w.set_property("start-at", start_at); },
|
||||
prop(value: as_f64) { w.set_property("value", value.clamp(0.0, 100.0)); },
|
||||
// @prop start-at - the percentage that the circle should start at
|
||||
prop(start_at: as_f64) { w.set_property("start-at", start_at.clamp(0.0, 100.0)); },
|
||||
// @prop thickness - the thickness of the circle
|
||||
prop(thickness: as_f64) { w.set_property("thickness", thickness); },
|
||||
// @prop clockwise - wether the progress bar spins clockwise or counter clockwise
|
||||
|
Loading…
Reference in New Issue
Block a user