From 4152bf1438dcb47844231dbd1758089de0083d7d Mon Sep 17 00:00:00 2001 From: passivestar <60579014+passivestar@users.noreply.github.com> Date: Thu, 8 Jan 2026 17:46:30 +0400 Subject: [PATCH] Adjust tree cells to account for new inner margins logic --- editor/themes/theme_classic.cpp | 6 +++--- editor/themes/theme_modern.cpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/editor/themes/theme_classic.cpp b/editor/themes/theme_classic.cpp index c7d146fbbd..1380bce40e 100644 --- a/editor/themes/theme_classic.cpp +++ b/editor/themes/theme_classic.cpp @@ -612,12 +612,12 @@ void ThemeClassic::populate_standard_styles(const Ref &p_theme, Edi 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", p_config.separation_margin); + p_theme->set_constant("v_separation", "Tree", p_config.base_margin * EDSCALE); 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)); - p_theme->set_constant("inner_item_margin_top", "Tree", p_config.separation_margin); - p_theme->set_constant("inner_item_margin_bottom", "Tree", p_config.separation_margin); + p_theme->set_constant("inner_item_margin_top", "Tree", p_config.base_margin * 0.75 * EDSCALE); + p_theme->set_constant("inner_item_margin_bottom", "Tree", p_config.base_margin * 0.75 * EDSCALE); p_theme->set_constant("inner_item_margin_left", "Tree", p_config.increased_margin * EDSCALE); p_theme->set_constant("inner_item_margin_right", "Tree", p_config.increased_margin * EDSCALE); p_theme->set_constant("button_margin", "Tree", p_config.base_margin * EDSCALE); diff --git a/editor/themes/theme_modern.cpp b/editor/themes/theme_modern.cpp index 85f4f1f51f..928369f270 100644 --- a/editor/themes/theme_modern.cpp +++ b/editor/themes/theme_modern.cpp @@ -625,13 +625,13 @@ 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); - int tree_v_sep = p_config.enable_touch_optimizations ? p_config.separation_margin : Math::pow(p_config.base_margin * 0.2 * EDSCALE, 3); + int tree_v_sep = p_config.enable_touch_optimizations ? (p_config.separation_margin * 0.9) : Math::pow(p_config.base_margin * 0.175 * 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)); - p_theme->set_constant("inner_item_margin_top", "Tree", p_config.separation_margin); - p_theme->set_constant("inner_item_margin_bottom", "Tree", p_config.separation_margin); + p_theme->set_constant("inner_item_margin_top", "Tree", p_config.base_margin * 0.75 * EDSCALE); + p_theme->set_constant("inner_item_margin_bottom", "Tree", p_config.base_margin * 0.75 * EDSCALE); p_theme->set_constant("inner_item_margin_left", "Tree", p_config.base_margin * EDSCALE); p_theme->set_constant("inner_item_margin_right", "Tree", p_config.base_margin * EDSCALE); p_theme->set_constant("button_margin", "Tree", p_config.base_margin * EDSCALE);