Browse Source

Merge pull request #102438 from Giganzo/tree-item-margin-low-spacing

Fix Tree `item_margin` for low spacing values in Editor Theme
Thaddeus Crews 7 months ago
parent
commit
478e919de7
1 changed files with 1 additions and 1 deletions
  1. 1 1
      editor/themes/editor_theme_manager.cpp

+ 1 - 1
editor/themes/editor_theme_manager.cpp

@@ -966,7 +966,7 @@ void EditorThemeManager::_populate_standard_styles(const Ref<EditorTheme> &p_the
 			p_theme->set_constant("v_separation", "Tree", p_config.separation_margin);
 			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", 3 * p_config.increased_margin * EDSCALE);
+			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_left", "Tree", p_config.increased_margin * EDSCALE);