I have a dialog containing pygtk.treeview for setting priority tasks. Each line has a background color set based on this priority, therefore, for example, the light red background has the highest priority.
The row selection color is not so easy to change. I can set it using treeview.modify_base(gtk.STATE_SELECTED, "#C4C4C4") , but no colors will work well with the colors used to improve the concept of priority.
I had the idea to change the highlight color as a slightly darker version of the color used as the normal background of the line, so in the above example it will be a darker red. I tried calling the function above in response to the treselection changed signal, and it works, but with heavy flickering.
Another idea was to change the selection to transparent and place a border around it, but as far as I can tell, this is not possible.
- How to change the highlight color as described above without flickering?
- Can I change the selection display with only a border around the line?
Note. I know this violates the theme chosen by the user. I feel that I have a good reason. Having a priority indicated by color makes it instantly recognizable. The highlight color hides it. If you have alternative suggestions, I am open to them, but it should retain the ease with which the user can prioritize.
python user-interface gtk pygtk gtktreeview
Jon
source share