racket/gui gtk: preserve button font on label change
This commit is contained in:
parent
62f74cda0e
commit
306194e9fa
|
@ -118,10 +118,12 @@
|
|||
(define/override (get-label-gtk)
|
||||
(gtk_bin_get_child (get-client-gtk)))
|
||||
|
||||
(define the-font font)
|
||||
(define/override (set-label s)
|
||||
(cond
|
||||
[(string? s)
|
||||
(gtk_button_set_label gtk (mnemonic-string s))]
|
||||
(gtk_button_set_label gtk (mnemonic-string s))
|
||||
(when the-font (install-control-font (get-label-gtk) the-font))]
|
||||
[else
|
||||
(let ([pixbuf (bitmap->pixbuf s)])
|
||||
(atomically
|
||||
|
|
Loading…
Reference in New Issue
Block a user