Hi,
I have hooked up an ApplicationCommandManager hot-key to switch between LookAndFeels. This works amazingly well, except for a snag with TextEditors. When the LookAndFeel changes, the TextEditor repaints its borders and background, but
a) does not update the text color, and
b) does not restore the caret.
I was able to fix b) by calling updateCaretPosition() from TextEditor::lookAndFeelChanged():
void TextEditor::lookAndFeelChanged()
{
if (isCaretVisible())
{
setCaretVisible (false);
setCaretVisible (true);
updateCaretPosition();
}
}
I don’t know what to do about a) though. The effect is rather entertaining, where text stays in the colour it was initially typed in, and flipping LookAndFeels allows me to type multi-colored text into the editor.
So I guess what I was hoping for is that the entire body text would change color to the new textColourId. Possible? Desirable?
Thanks!