fix sizing bug in tooltip windows
This commit is contained in:
parent
70fac182c6
commit
36aeda60a4
|
@ -69,7 +69,12 @@
|
|||
(define/private (update-size)
|
||||
(define dc (get-dc))
|
||||
(send dc set-font small-control-font)
|
||||
(define-values (w h _1 _2) (send dc get-text-extent (car labels)))
|
||||
(define-values (w h)
|
||||
(for/fold ([w 0] [h 0])
|
||||
([lab (in-list labels)])
|
||||
(define-values (this-w this-h _1 _2) (send dc get-text-extent lab))
|
||||
(values (max this-w w)
|
||||
(max this-h h))))
|
||||
(send (get-parent) begin-container-sequence)
|
||||
(min-width (+ 5 (inexact->exact (ceiling w))))
|
||||
(min-height (+ 5 (* (length labels) (inexact->exact (ceiling h)))))
|
||||
|
|
Loading…
Reference in New Issue
Block a user