Table LAF.... but not
-
So I've been tinkering with the Table LAF and it's great. The mouse hover function is nice, and got me wondering why it wasn't there already - and then I realised that it is, but not when you select custom colours for tables. Then the hover function disappears.
So I had a hack at the source files and managed to get it back in. Now why would I do this? Well weirdly I have a situation where I've got a table on my main UI on which I don't want to show the table points (but I do on others). This seemed impossible once engaging LAF on the tables. But I still really wanted the mouse hover function... Anyway enough rambling! If anyone wants to know I stuck the below code at line 856 of TableEditor.cpp
if (isHover) { g.setColour(Colours::white.withAlpha(0.3f)); g.drawRoundedRectangle(3.0f, 3.0f, width, width, round, isHover ? 2.0f : 1.0f); g.setColour(Colours::white.withAlpha(0.2f)); g.fillRoundedRectangle(3.0f, 3.0f, width, width, round); }
I should caveat this by mentioning that I generally have no idea what I'm doing / breaking when messing with the source files, but I've managed a few wins. Someone might want to double check this however! :grinning_squinting_face:
-
@DanH I haven't really checked but one thing jumps out, you have a isHover ternary inside a isHover in the if statement. The answer of the ternary will then be either true, or… true… ;)
-
@ustk Well I just copied it all from a different part of the script so I think @Christoph-Hart is to blame for this one really :)