gtk3 - Can't set CSS to specified widget in GTK+ -
i'm using vala gtk+ , i'm trying add custom css specified widget. can add fe. backgroudn gtkwidget not #sidebar
#sidebar { //it doesn't work color: white; } gtkwindow { // works background-color: red; }
i'm adding class widget that:
sidebar = new gtk.label("hello"); sidebar.set_name("sidebar");
and it's changes color gtkwindow, not label.
any ideas?
i haven't programmed in vala, should add class stylecontext. in c
sidebar = gtk_label_new ("hello'); gtk_style_context_add_class ( gtk_widget_get_style_context ("mysidebar"), sidebar);
also, style "sidebar", defined in gtkstyle. should change "sidebar" in css else (sidebar used views, toolbar etc) if persist, syntax should be:
.mysidebar { #anything }
Comments
Post a Comment