gtk+中对字体大小及颜色的修改

字体大小用pango

PangoFontDescription *font_desc = pango_font_description_from_string ("Serif 15");或
PangoFontDescription *font_desc = pango_font_description_from_string("Sans");  
pango_font_description_set_size (font_desc, 15 * PANGO_SCALE);

gtk_widget_modify_font (要改的控件(如label,view), font_desc);
pango_font_description_free (font_desc);

颜色用gdk这个以前好像写过.

gdk_color_parse ("颜色(如green,red,blue)", &color);
gtk_widget_modify_text (控件, GTK_STATE_NORMAL, &color);

 

你可能感兴趣的:(String,gtk)