Fw: Changing the font of an gtkbutton label

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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



_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux