1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 19:15:07 +00:00

LibGUI: Add a ThemeChange event

This commit is contained in:
Oriko 2020-03-16 13:36:21 +02:00 committed by Andreas Kling
parent 2b162ef794
commit 2a32330257
8 changed files with 53 additions and 1 deletions

View file

@ -1279,6 +1279,13 @@ void TextEditor::resize_event(ResizeEvent& event)
recompute_all_visual_lines();
}
void TextEditor::theme_change_event(ThemeChangeEvent& event)
{
ScrollableWidget::theme_change_event(event);
if (m_highlighter)
m_highlighter->rehighlight(palette());
}
void TextEditor::set_selection(const TextRange& selection)
{
if (m_selection == selection)