Change selection color to a Cell in TreeView

For the example: I have a treeview with two columns, the first a Pixbuf with an icon, and in the other column a text: https://i.imgur.com/h6bVhQb.png

I would like that when selecting one of the rows the first cell (the one with the icon) would not be marked, that is, the icon would not be placed on the layer of the selection color.

It’s possible? What happened to me is to change the CSS style, overriding “:selected” of the cell or row but the change is not applied. I tried it through code and in ‘GtkInspector’.

columnview > listview > row { ...  }
columnview > listview > row > cell { ...  }

There is also no attribute/property that allows to do what I want.

I want it to be something like this: https://i.imgur.com/S3NiXHd.png

I read that I would have to apply the gtk_tree_view set_rules_hint function to be able to set the style changes, but that function is deprecated in GTK4

Or would I have to put two TreeView with one column each.

Thanks!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.