Editor: More space for timings in BehaviorTreeView

This commit is contained in:
Serhii Snitsaruk 2024-02-06 12:00:35 +01:00
parent d0c7d98fc4
commit a353e561de
1 changed files with 5 additions and 1 deletions

View File

@ -179,7 +179,11 @@ void BehaviorTreeView::_do_update_theme_item_cache() {
}
tree->set_column_clip_content(0, true);
tree->set_column_custom_minimum_width(1, 18 * _get_editor_scale());
tree->set_column_custom_minimum_width(2, (50 + extra_spacing) * _get_editor_scale());
Ref<Font> font = tree->get_theme_font(LW_NAME(font), LW_NAME(Tree));
int font_size = tree->get_theme_font_size(LW_NAME(font_size), LW_NAME(Tree));
int timings_size = font->get_string_size("0.00", HORIZONTAL_ALIGNMENT_LEFT, -1, font_size).x + 12 + extra_spacing;
tree->set_column_custom_minimum_width(2, timings_size * _get_editor_scale());
}
void BehaviorTreeView::_notification(int p_what) {