diff options
author | mujpao <mujpao@gmail.com> | 2020-10-13 13:58:09 -0700 |
---|---|---|
committer | mujpao <mujpao@gmail.com> | 2020-10-13 14:58:06 -0700 |
commit | 011fdece6d5a6570512b5b6fd112183363c7c318 (patch) | |
tree | e76ff3676936df0c2934ff2e3ffa5d9e4d8302e8 | |
parent | bc91e088e4503bbf1c5800282f2974011a4cc8e8 (diff) |
Make search results font follow code editor font
The font size of the Find in Files dialog used to get out of sync with
the code editor font size.
The font of the Find in Files dialog is now updated each time there is a
change to the theme. This way, the font size of the Find in Files
results changes in response to the code font size being changed using
Ctrl +/- or using the Editor Settings.
Fixes #35499
-rw-r--r-- | editor/find_in_files.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/editor/find_in_files.cpp b/editor/find_in_files.cpp index c2ccbdb08c..5f4d7d206d 100644 --- a/editor/find_in_files.cpp +++ b/editor/find_in_files.cpp @@ -690,6 +690,9 @@ void FindInFilesPanel::stop_search() { void FindInFilesPanel::_notification(int p_what) { if (p_what == NOTIFICATION_PROCESS) { _progress_bar->set_as_ratio(_finder->get_progress()); + } else if (p_what == NOTIFICATION_THEME_CHANGED) { + _search_text_label->add_theme_font_override("font", get_theme_font("source", "EditorFonts")); + _results_display->add_theme_font_override("font", get_theme_font("source", "EditorFonts")); } } |