瀏覽代碼

Merge pull request #63654 from bruvzg/font_prev_scale

Fix font preview plugin not using editor scale.
Rémi Verschelde 3 年之前
父節點
當前提交
f7c22756e1
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      editor/plugins/font_config_plugin.cpp

+ 1 - 1
editor/plugins/font_config_plugin.cpp

@@ -926,7 +926,7 @@ void FontPreview::_notification(int p_what) {
 					if (sample.is_empty()) {
 						prev_ok = false;
 					} else {
-						prev_font->draw_string(get_canvas_item(), Point2(0, font->get_height(font_size) + prev_font->get_height(50)), sample, HORIZONTAL_ALIGNMENT_CENTER, get_size().x, 50, text_color);
+						prev_font->draw_string(get_canvas_item(), Point2(0, font->get_height(font_size) + prev_font->get_height(25 * EDSCALE)), sample, HORIZONTAL_ALIGNMENT_CENTER, get_size().x, 25 * EDSCALE, text_color);
 					}
 				}
 			}