[prev in list] [next in list] [prev in thread] [next in thread]
List: gtk
Subject: Changing the font of an gtkbutton label
From: "Luiz Rafael Culik Guimaes" <culikr () uol ! com ! br>
Date: 2003-08-30 21:40:50
[Download RAW message or body]
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
_______________________________________________
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic