Friday, May 09, 2014

Difficulties Over Setting Rollover Tag Attributes. -SOLVED

Setting individual rollover colours for tags seems a little more trouble some than I first imagined. After adding a whole pile of code that wasn't going anywhere it was time to rethink!

Occam's Razor time.

Whenever a solution is becoming overly complex to the point that it begins to fail, then the solution is wrong. After a while I thought that if rollovers were implemented in Gtk2+ how would it be listed in the docs? Ah! Styles -- a little voice said behind me. But, as no such style exists (if it does let me know), it seems right to add two pseudo styles: "rollover-fg" and "rollover-bg". These can be set using the familiar:

gnocl::setStyles GtkTextView "rollover-bg" blue

What is needed now is to remove the earlier tag options to set these colours.

No comments: