Problem setting the forground.

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

 



I am using GTK 1.2 for an embedded project and I can seem to set the forground color correctly.

void draw_header (GtkWidget *widget){
    GdkGCValues gcv;
    GdkGC *gc;
    GdkColor gdkBlue;
    gdk_color_parse("blue", &gdkBlue);
    gc = gdk_gc_new(widget->window);
    gdk_gc_set_foreground(gc,&gdkBlue);   
    GdkRectangle update_rect;
    int width=widget->allocation.width;
    int height=widget->allocation.height;
    update_rect.x =0;
    update_rect.y =0;
    update_rect.width=width;
     update_rect.height = height;
    gdk_draw_rectangle (pixmap, gc, TRUE,0, 0,width, 10);
    gtk_widget_draw (widget, &update_rect);
}
No matter what color I put in I get a green bar!
Any ideas or suggestions?
_______________________________________________
gtk-list mailing list
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