开发者

Gtk.Style.Font is obsolete?

开发者 https://www.devze.com 2023-01-04 06:33 出处:网络
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?

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).

0

精彩评论

暂无评论...
验证码 换一张
取 消