win32: fix horizontal `radio-box%'
Merge to 5.1
(cherry picked from commit 8f404a4618
)
This commit is contained in:
parent
9721ad1ce7
commit
08ff71d1a1
|
@ -49,6 +49,7 @@
|
||||||
(define label-bitmaps null)
|
(define label-bitmaps null)
|
||||||
|
|
||||||
(define radio-hwnds
|
(define radio-hwnds
|
||||||
|
(let ([horiz? (memq 'horizontal style)])
|
||||||
(let loop ([y 0] [w 0] [labels labels])
|
(let loop ([y 0] [w 0] [labels labels])
|
||||||
(if (null? labels)
|
(if (null? labels)
|
||||||
(begin
|
(begin
|
||||||
|
@ -80,11 +81,15 @@
|
||||||
(set-control-font font radio-hwnd)
|
(set-control-font font radio-hwnd)
|
||||||
(let-values ([(w1 h)
|
(let-values ([(w1 h)
|
||||||
(auto-size font label 0 0 20 4
|
(auto-size font label 0 0 20 4
|
||||||
(lambda (w h)
|
(lambda (w1 h1)
|
||||||
(MoveWindow radio-hwnd 0 (+ y SEP) w h #t)
|
(if horiz?
|
||||||
(values w h)))])
|
(MoveWindow radio-hwnd (+ w SEP) 0 w1 h1 #t)
|
||||||
|
(MoveWindow radio-hwnd 0 (+ y SEP) w1 h1 #t))
|
||||||
|
(values w1 h1)))])
|
||||||
(cons radio-hwnd
|
(cons radio-hwnd
|
||||||
(loop (+ y SEP h) (max w1 w) (cdr labels))))))))
|
(loop (if horiz? (max y h) (+ y SEP h))
|
||||||
|
(if horiz? (+ w SEP w1) (max w1 w))
|
||||||
|
(cdr labels)))))))))
|
||||||
|
|
||||||
(unless (= val -1)
|
(unless (= val -1)
|
||||||
(SendMessageW (list-ref radio-hwnds val) BM_SETCHECK 1 0))
|
(SendMessageW (list-ref radio-hwnds val) BM_SETCHECK 1 0))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user