OK: Trying to upgrade a Gtkmm 2.4 codebase to Gtkmm 3.0. The customer requires alternating row colors in treeviews, and also will not allow any other theme than the four that came with RHEL 8.0 (Adwaita, Adwaita Dark, HighContrast, HighContrastInverse). (Therfore, lectures about letting the user pick a theme to get their row colors will fall on deaf ears...because, basically, there aren't any themes available to us that do so. Plus, the user won't be allowed to select a theme anyway.)
I know about the set_rules_hint( ) method and used it in the past but with Gtkmm/Gtk 3.0 and RHEL 8.0 it doesn't result in alternating row colors with any of the four themes I can pick from (one of which will ultimately be imposed on the users).
Does anyone have any insight? Again: I can't find a theme that has this enabled, I probably couldn't get the customer (who is concerned with security) to let me download it even if I could find one, and none of the pre-installed themes has it. So please do NOT tell me to just let the theme handle it. The themes are just like Ford Model Ts: they will give me any thing I want as long as it doesn't have alternating row colors.
Things tried:
I've experimented some with CSS files, because I saw a python-based fix for it elsewhere, but that was a loaded string in Python and no attempt to imitate that in my CSS file actually worked. (Some of the other things in that string were just flat-out wrong syntax resulting in a core file when put into my CSS file.) Basically, I can't figure out how to "get to" treeview rows in CSS. Nothing I try works. (The available tags, subclasses, etc are very poorly documented--and what little I have indicates that a treeview only has its header as a descendant...that can't be right?)
The closest I could come to actually controlling the background of the rows in the table was:
treeview { background: <whatever color> }
But it turned the entire background into that color (including unused rows).
Attempts to do something like this:
treeview:nth-child(even) { background: <whatever color> }
did the same thing; i.e. the entire background of the data area becomes that color with no alternation.
That tells me I'm not actually accessing the rows. How do I get to the rows?