静下来,定好方向,好好干。
分类: LINUX
2008-07-22 20:25:30
GTK label 字体改变方法:
60 /*label*/
61 //lbl_test = gtk_label_new (_("\345\255\227\344\275\223\346\265\213\350\257\225"));
62 lbl_test = gtk_label_new (_("Label Test 测试"));
63
64 PangoFontDescription *font_desc = pango_font_description_from_string("Sans");
65 pango_font_description_set_size (font_desc, 25 * PANGO_SCALE);
66 gtk_widget_modify_font (lbl_test, font_desc);
67
68 gdk_color_parse ("red", &color);
69 gtk_widget_modify_fg(lbl_test, GTK_STATE_NORMAL, &color);
70
71 gtk_widget_show (lbl_test);
72 gtk_box_pack_start (GTK_BOX (vbox1), lbl_test, TRUE, TRUE, 0);
73 /*label end---*/
74
75 /*button*/
76 //button1 = gtk_button_new_with_mnemonic (_("button1"));
77 button1 = gtk_button_new_with_label (_("button1"));
78 //button1 = gtk_button_new_from_stock (GTK_STOCK_OK);
79 //button1 = gtk_button_new_from_stock ("lbl_button");
80 //gtk_button_set_use_sto