Gtk Change Font and font color for an application

前端 未结 2 978
北恋
北恋 2021-01-22 07:20

I am having one Gtk+ and C application in which i want to set the font to some XYZ font type and font color to blue, for all the labels and text in the application how can i do

2条回答
  •  深忆病人
    2021-01-22 07:51

    It is generally considered bad form to do that; apps should respect the user's theme. That said, you can deploy a resource file with the settings you want to override in your application, and then use gtk_rc_parse() to load the file at runtime.

    Check out GTK+ Resource Files documentation for details.

提交回复
热议问题