Hi All ,
For GTK+ 3.8 onwards to set opacity gtk_widget_set_opacity is used ( gtk_window_set_opacity has been deprecated ).
I made a sample in which a button is created under toplevel window . The above opacity works for buttons ( child widgets ) not for toplevel window .
If I set the opacity in toplevel window , then it has no effect .
Could anyone tell how to set the opacity to level window .
code snippet :
int main( int argc,
char *argv )
GdkRGBA color ;
gtk_init (&argc, &argv);
GtkBuilder *builder = gtk_builder_new ();
gtk_builder_add_from_file (builder, "opacity.glade", NULL);
window = GTK_WIDGET (gtk_builder_get_object (builder, "window1"));
button = GTK_WIDGET (gtk_builder_get_object (builder, "button1"));
gdk_rgba_parse (&color, "blue");
gtk_widget_override_background_color (window , 0, &color);
gtk_widget_set_opacity ( window , 0.5 );