Changing the font of an gtkbutton label
- From: "Luiz Rafael Culik Guimaes" <culikr uol com br>
- Cc: gtk-list gnome org
- Subject: Changing the font of an gtkbutton label
- Date: Sat, 30 Aug 2003 18:40:50 -0300
 Dear  friends
How to change the font of an button label
this is an generic piece of code i use
to change font for labels on menus and
gtklabels
         PangoFontDescription
*font_desc =
pango_font_description_from_string(prop->value.font);
         GtkRcStyle *style ;
	 switch( wWidget->type )
        {
            case XWT_TYPE_BUTTON:
            case XWT_TYPE_TOGGLEBUTTON:
            case XWT_TYPE_RADIOBUTTON:
            case XWT_TYPE_CHECKBOX:
	    {
	        GtkWidget *child =
gtk_bin_get_child(GTK_BIN(wSelf));
gtk_widget_modify_font(GTK_WIDGET(child),font_desc);
	    }
		break;
            case XWT_TYPE_LABEL:
	        style =
gtk_widget_get_modifier_style(wMain);
                style -> font_desc =
font_desc;
gtk_widget_modify_style(GTK_WIDGET(wMain)
, style);
		break;
}
For labels(GTK_LABEL) works properly,
what i'm doing wrong on this code
Thanks in advance
Regards
Luiz
---
Acabe com aquelas janelinhas que pulam na sua tela.
AntiPop-up UOL - É grátis!
http://antipopup.uol.com.br
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]