Using gtk# on a cross platform application and trying to fix all the warnings, one of the warnings is that Gtk.Style.Font & Gdk.font is obsolete so can anybody point me to what replaced it?
All the google hits I get tell me to use Gtk.Style.Font etc... so hopefully somebody can help me out.开发者_如何学Python
In that kind of cases, your best bet is to consult the official API documentation:
This is deprecated and should not be used in new code. New code should use
Style.FontDescription
instead.
If you are using an IDE, it would be a good idea to have the documentation handy.
For setting the font, use x.ModifyFont(yourFontDescription)
(the property x.Style.FontDescription
is read-only).
精彩评论