How to change background and selected color of GtkTreeView

627836c1fdbc688f352b61c2c7abc73c.png
1. in Gtk 3 the style are done with css;
2. so create
GtkTreeView
with the
GtkTreeViewColumn
and
GtkCellRendererText
as normal;
3. create
GtkCssProvider
;
4. load css data with
GtkCssProvider::load_from_data
;
5. create
GtkStyleContext
and add provider to the screen, to css be accessible for all widgets;
6. use .view to style the
GtkTreeView
;