From c1a65e52896ae060881bba929dd4a7ff824139b9 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Thu, 12 Nov 2020 16:01:27 +0100 Subject: Use 75% editor scale on small displays automatically This also makes borders always display in the editor theme, even if the editor scale is below 100%. Otherwise, "focus" outlines would vanish when using an editor scale below 100%, which harms usability. --- editor/editor_themes.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'editor/editor_themes.cpp') diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index 79525ced51..768e5bccbc 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -441,7 +441,8 @@ Ref create_editor_theme(const Ref p_theme) { // Highlighted tabs and border width Color tab_color = highlight_tabs ? base_color.lerp(font_color, contrast) : base_color; - const int border_width = CLAMP(border_size, 0, 3) * EDSCALE; + // Ensure borders are visible when using an editor scale below 100%. + const int border_width = CLAMP(border_size, 0, 3) * MAX(1, EDSCALE); const int default_margin_size = 4; const int margin_size_extra = default_margin_size + CLAMP(border_size, 0, 3); -- cgit v1.2.3