Skip to content

Commit

Permalink
Fix progress sizing mode (#5051)
Browse files Browse the repository at this point in the history
  • Loading branch information
hoxbro authored Jun 8, 2023
1 parent 9b6ef22 commit 2f0eaf3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions panel/widgets/indicators.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,10 @@ class Progress(ValueIndicator):

max = param.Integer(default=100, doc="The maximum value of the progress bar.")

sizing_mode = param.ObjectSelector(default=None, objects=[
'fixed', 'stretch_width', 'stretch_height', 'stretch_both',
'scale_width', 'scale_height', 'scale_both', None])

value = param.Integer(default=-1, bounds=(-1, None), doc="""
The current value of the progress bar. If set to -1 the progress
bar will be indeterminate and animate depending on the active
Expand All @@ -232,8 +236,6 @@ def _update_value_bounds(self):
self.param.value.bounds = (-1, self.max)

def __init__(self,**params):
if "sizing_mode" not in params:
params["sizing_mode"] = None
super().__init__(**params)
self._update_value_bounds()

Expand Down

0 comments on commit 2f0eaf3

Please sign in to comment.