Skip to content

Commit 6c78cd2

Browse files
committed
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
1 parent de03f1a commit 6c78cd2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

gui-lib/mred/private/wx/cocoa/slider.rkt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,8 @@
164164
(flip (inexact->exact (floor (tell #:type _double slider-cocoa doubleValue)))))
165165

166166
(define/public (update-message [val (get-value)])
167-
(tellv message-cocoa setStringValue: #:type _NSString (format "~a" val)))
167+
(tellv message-cocoa setStringValue: #:type _NSString (format "~a" val))
168+
(tellv message-cocoa sizeToFit))
168169

169170
(inherit get-cocoa-window)
170171
(define/override (post-mouse-down)

0 commit comments

Comments
 (0)