Commit fc16bdcc authored by Fjen Undso's avatar Fjen Undso
Browse files

numberbar: no float values from mouse

parent bfd85982
......@@ -30,7 +30,7 @@ class NumberBarContainer(FocusSwitcher):
"""Set the progress to the approx mouse position in ProgressBar."""
p = self._get_progressbar()
if p.row - 1 <= my <= p.row + p.height and p.col - 1 <= mx <= p.col + p.width:
val = 255 - (my - p.row) / p.height * 255
val = int(255 - (my - p.row) / p.height * 255)
self._get_numberrange().set(val)
p.set(val)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment