RC File

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

 



Hi,

I try to make a RC file (~/.gtkrc-2.0) work, but nothing... I want to change all buttons color and its label color, but not the all labels.

I made this code to tests:

#include <gtk/gtk.h>

static gboolean Delete_Event( GtkWidget *widget, GdkEvent *event, gpointer data){
gtk_main_quit();
}


int main(int argc, char *argv[]){
GtkWidget *Window, *Box, *Label, *Button;
gtk_init (&argc, &argv);
Window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_container_set_border_width(GTK_CONTAINER(Window), 10);
g_signal_connect (G_OBJECT(Window), "delete_event", G_CALLBACK (Delete_Event), NULL);
Box = gtk_vbox_new(TRUE, 10);
gtk_container_add(GTK_CONTAINER(Window), Box);
Label = gtk_label_new("No Colored Text");
gtk_box_pack_start(GTK_BOX(Box), Label, TRUE, TRUE, 0);
Button = gtk_button_new_with_label("Colored Button");
gtk_box_pack_start(GTK_BOX(Box), Button, TRUE, TRUE, 0);
gtk_widget_show_all(Window);
gtk_main();
return 0;
}


and this RC file (~/.gtkrc-2.0):

style "Blue_Button"
{
 bg[NORMAL] = { 0.192, 0.416, 0.773 }
 bg[PRELIGHT] = { 0.202, 0.437, 0.812 }
 bg[ACTIVE] = { 0.182, 0.395, 0.734 }

 fg[NORMAL] = { 1.000, 1.000, 1.000 }
 fg[PRELIGHT] = { 1.000, 1.000, 1.000 }
 fg[ACTIVE] = { 1.000, 1.000, 1.000 }
}
class "GtkButton" style "Blue_Button"

style "Blue_Button_Label"
{
 bg[NORMAL] = { 0.192, 0.416, 0.773 }
 bg[PRELIGHT] = { 0.202, 0.437, 0.812 }
 bg[ACTIVE] = { 0.182, 0.395, 0.734 }

 fg[NORMAL] = { 0.925, 0.925, 0.925 }
 fg[PRELIGHT] = { 1.000, 1.000, 1.000 }
 fg[ACTIVE] = { 0.850, 0.850, 0.850 }
}
class "GtkLabel" style "Blue_Button_Label"

What do I do?

Thanks.

Claudio

_________________________________________________________________
MSN Messenger: converse com os seus amigos online. http://messenger.msn.com.br


_______________________________________________

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