mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 06:48:49 +00:00
LibGUI: Use themes for syntax highlighting
This commit is contained in:
parent
6da7fd9aab
commit
2b162ef794
Notes:
sideshowbarker
2024-07-19 08:17:09 +09:00
Author: https://github.com/oriko1010
Commit: 2b162ef794
Pull-request: https://github.com/SerenityOS/serenity/pull/1471
14 changed files with 219 additions and 85 deletions
|
@ -1211,7 +1211,7 @@ void TextEditor::did_change()
|
|||
if (on_change)
|
||||
on_change();
|
||||
if (m_highlighter)
|
||||
m_highlighter->rehighlight();
|
||||
m_highlighter->rehighlight(palette());
|
||||
m_has_pending_change_notification = false;
|
||||
});
|
||||
}
|
||||
|
@ -1491,7 +1491,7 @@ void TextEditor::flush_pending_change_notification_if_needed()
|
|||
if (on_change)
|
||||
on_change();
|
||||
if (m_highlighter)
|
||||
m_highlighter->rehighlight();
|
||||
m_highlighter->rehighlight(palette());
|
||||
m_has_pending_change_notification = false;
|
||||
}
|
||||
|
||||
|
@ -1507,7 +1507,7 @@ void TextEditor::set_syntax_highlighter(OwnPtr<SyntaxHighlighter> highlighter)
|
|||
m_highlighter = move(highlighter);
|
||||
if (m_highlighter) {
|
||||
m_highlighter->attach(*this);
|
||||
m_highlighter->rehighlight();
|
||||
m_highlighter->rehighlight(palette());
|
||||
} else
|
||||
document().set_spans({});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue