Hello,
I'm having a problem changing the font and the text
color for a widget. I would like to be able to have some items in
a clist to be bold and some to not be. I tried this:
void ChangeFont(GtkWidget *widget)
{
GtkStyle *style;
style = gtk_widget_get_style(widget);
_font = gdk_font_load(_ConstructFont());
if(_font != NULL) {
style->font = _font;
for(int i=0; i<5; i++) {
style->text[i] = TextColor();
// TextColor returns a GtkColor *
}
gtk_widget_set_style(widget, style);
gtk_widget_ensure_style(widget);
}
}
But it screws up the background and foreground colors that are set with the gtk themes. I even tried to just set the style in the widget directly (just the stuff that I want changed) and nothing happened. What am I missing?
-eric
-- ---- Eric Plaster Image Manipulation Systems Software Engineer (612)753-5602 x117 plaster@imageman.com www.imageman.com