From 17a19ee1047c8fe60e68b3d0f8bd7cfa8e7375f6 Mon Sep 17 00:00:00 2001 From: mujpao Date: Tue, 13 Oct 2020 13:58:09 -0700 Subject: [PATCH] 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 (cherry picked from commit 011fdece6d5a6570512b5b6fd112183363c7c318) --- editor/find_in_files.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/editor/find_in_files.cpp b/editor/find_in_files.cpp index 50a5520b012..73a4e0163e9 100644 --- a/editor/find_in_files.cpp +++ b/editor/find_in_files.cpp @@ -640,6 +640,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_font_override("font", get_font("source", "EditorFonts")); + _results_display->add_font_override("font", get_font("source", "EditorFonts")); } }