racket/gui win32: fix measurement of message%
content
Strip away "&" before measuring.
This commit is contained in:
parent
a64a1cb177
commit
58e24e18a2
|
@ -88,7 +88,7 @@
|
|||
|
||||
(if (symbol? label)
|
||||
(set-size #f #f 32 32)
|
||||
(auto-size font label 0 0 0 0))
|
||||
(auto-size font (strip-& label) 0 0 0 0))
|
||||
|
||||
(define/public (set-preferred-size) #f)
|
||||
|
||||
|
|
|
@ -47,6 +47,7 @@
|
|||
SelectObject
|
||||
WideCharToMultiByte
|
||||
GetDeviceCaps
|
||||
strip-&
|
||||
->screen
|
||||
->normal))
|
||||
|
||||
|
@ -163,6 +164,13 @@
|
|||
-> _int))
|
||||
;; ----------------------------------------
|
||||
|
||||
(define (strip-& s)
|
||||
(if (string? s)
|
||||
(regexp-replace* #rx"&(.)" s "\\1")
|
||||
s))
|
||||
|
||||
;; ----------------------------------------
|
||||
|
||||
(define-gdi32 GetDeviceCaps (_wfun _HDC _int -> _int))
|
||||
|
||||
(define screen-dpi
|
||||
|
|
Loading…
Reference in New Issue
Block a user