tags:

views:

287

answers:

1

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 this in one go, I have developed all the screen using Glade RAD tool, and currently i am doing this by calling following function for each label.

gtk_label_set_markup( label,"<span font='FONT NAME' foreground='#FFFFFF' size='large'><b>MY Text</b></span>");

So how can i tell the Gtk to use my font and font color for every label and for every widget in the application.

Thanks,

+1  A: 

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.

axel_c