Skip to content

Commit

Permalink
If ranges are same, set slider unit to 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinmera committed Sep 30, 2024
1 parent f5d5984 commit af4fd85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/slider.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
(defmethod slider-unit ((slider slider))
(destructuring-bind (min . max) (range slider)
(if (= min max)
0
1.0
(max 0 (min 1 (/ (- (value slider) min) (- max min)))))))

(defmethod (setf value) :around (value (slider slider))
Expand Down

0 comments on commit af4fd85

Please sign in to comment.