From 5981bf0d3afa51d19d578ca200695ed8969be129 Mon Sep 17 00:00:00 2001 From: Anish Kumar Date: Sat, 6 Dec 2025 12:46:19 +0530 Subject: [PATCH] Increase Tree vertical separation to improve touch usability --- editor/themes/theme_modern.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/editor/themes/theme_modern.cpp b/editor/themes/theme_modern.cpp index 9a64725fee9..679348dc92b 100644 --- a/editor/themes/theme_modern.cpp +++ b/editor/themes/theme_modern.cpp @@ -627,7 +627,8 @@ void ThemeModern::populate_standard_styles(const Ref &p_theme, Edit p_theme->set_color("title_button_color", "Tree", p_config.font_color); p_theme->set_color("drop_position_color", "Tree", p_config.accent_color); - p_theme->set_constant("v_separation", "Tree", Math::pow(p_config.base_margin * 0.2 * EDSCALE, 3)); + int tree_v_sep = p_config.enable_touch_optimizations ? p_config.separation_margin : Math::pow(p_config.base_margin * 0.2 * EDSCALE, 3); + p_theme->set_constant("v_separation", "Tree", tree_v_sep); p_theme->set_constant("h_separation", "Tree", (p_config.increased_margin + 2) * EDSCALE); p_theme->set_constant("guide_width", "Tree", p_config.border_width); p_theme->set_constant("item_margin", "Tree", MAX(3 * p_config.increased_margin * EDSCALE, 12 * EDSCALE));