Fixes bug in slider%

It would occasionally drop the last digit in the message field.

This turned out to be a bug where the number, while smaller, was wider.
For example:
11111
10101

In variable width fonts the second one will be wider
This commit is contained in:
Leif Andersen 2016-10-24 11:39:18 -04:00
parent de03f1a98f
commit 6c78cd266a

View File

@ -164,7 +164,8 @@
(flip (inexact->exact (floor (tell #:type _double slider-cocoa doubleValue)))))
(define/public (update-message [val (get-value)])
(tellv message-cocoa setStringValue: #:type _NSString (format "~a" val)))
(tellv message-cocoa setStringValue: #:type _NSString (format "~a" val))
(tellv message-cocoa sizeToFit))
(inherit get-cocoa-window)
(define/override (post-mouse-down)