Repository: godotengine/godot
File: editor/gui/code_editor.cpp (C++)

Code before:
	zoom_button->set_text("100 %");
	zoom_button->set_accessibility_name(TTRC("Zoom Factor"));

	PopupMenu *zoom_menu = zoom_button->get_popup();
	constexpr int preset_count = std_size(ZOOM_FACTOR_PRESETS);

	for (int i = 0; i < preset_count; i++) {
		float z = ZOOM_FACTOR_PRESETS[i];
		zoom_menu->add_item(itos(Math::round(z * 100)) + " %");
		zoom_menu->set_item_metadata(i, z);
	}

	zoom_menu->connect(SceneStringName(id_pressed), callable_mp(this, &CodeTextEditor::_zoom_popup_id_pressed));

	status_bar->add_child(memnew(VSeparator));

	// Line and column.
	line_and_col_button = memnew(Button);
	line_and_col_button->set_flat(false);
	line_and_col_button->set_theme_type_variation("FlatMenuButton");
	line_and_col_button->set_v_size_flags(SIZE_EXPAND | SIZE_SHRINK_CENTER);
	line_and_col_button->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
	line_and_col_button->set_tooltip_auto_translate_mode(AUTO_TRANSLATE_MODE_ALWAYS);
	line_and_col_button->set_tooltip_text(TTRC("Line and column numbers."));
	line_and_col_button->set_accessibility_name(TTRC("Line and column numbers."));
	line_and_col_button->set_focus_mode(FOCUS_ACCESSIBILITY);
	line_and_col_button->connect(SceneStringName(pressed), callable_mp(this, &CodeTextEditor::_show_goto_popup_request));
	line_and_col_button->set_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_line"));
	status_bar->add_child(line_and_col_button);

	status_bar->add_child(memnew(VSeparator));

	// Indentation
	indentation_txt = memnew(Label);
	status_bar->add_child(indentation_txt);
	indentation_txt->set_v_size_flags(SIZE_EXPAND | SIZE_SHRINK_CENTER);
	indentation_txt->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
	indentation_txt->set_tooltip_auto_translate_mode(AUTO_TRANSLATE_MODE_ALWAYS);
	indentation_txt->set_tooltip_text(TTRC("Indentation"));
	indentation_txt->set_accessibility_name(TTRC("Indentation"));
	indentation_txt->set_focus_mode(FOCUS_ACCESSIBILITY);
	indentation_txt->set_mouse_filter(MOUSE_FILTER_STOP);

	text_editor->connect(SceneStringName(gui_input), callable_mp(this, &CodeTextEditor::_text_editor_gui_input));
	text_editor->connect("caret_changed", callable_mp(this, &CodeTextEditor::_line_col_changed));
	text_editor->connect(SceneStringName(text_changed), callable_mp(this, &CodeTextEditor::_text_changed));
	text_editor->connect("code_completion_requested", callable_mp(this, &CodeTextEditor::_complete_request));
	TypedArray<String> cs = { ".", ",", "(", "=", "$", "@", "\"", "\'" };
	text_editor->set_code_completion_prefixes(cs);
	idle->connect("timeout", callable_mp(this, &CodeTextEditor::_text_changed_idle_timeout));


Review comment (suggestion):
```suggestion
```

This should not be needed, it was set for `Label` to allow it getting focus, but `Button` already can get focus.

Code after:
	zoom_button->set_v_size_flags(SIZE_EXPAND | SIZE_SHRINK_CENTER);
	zoom_button->set_text("100 %");
	zoom_button->set_accessibility_name(TTRC("Zoom Factor"));

	PopupMenu *zoom_menu = zoom_button->get_popup();
	constexpr int preset_count = std_size(ZOOM_FACTOR_PRESETS);

	for (int i = 0; i < preset_count; i++) {
		float z = ZOOM_FACTOR_PRESETS[i];
		zoom_menu->add_item(itos(Math::round(z * 100)) + " %");
		zoom_menu->set_item_metadata(i, z);
	}

	zoom_menu->connect(SceneStringName(id_pressed), callable_mp(this, &CodeTextEditor::_zoom_popup_id_pressed));

	status_bar->add_child(memnew(VSeparator));

	// Line and column.
	line_and_col_button = memnew(Button);
	line_and_col_button->set_theme_type_variation("FlatMenuButton");
	line_and_col_button->set_v_size_flags(SIZE_EXPAND | SIZE_SHRINK_CENTER);
	line_and_col_button->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
	line_and_col_button->set_tooltip_auto_translate_mode(AUTO_TRANSLATE_MODE_ALWAYS);
	line_and_col_button->set_tooltip_text(TTRC("Line and column numbers."));
	line_and_col_button->set_accessibility_name(TTRC("Line and column numbers."));
	line_and_col_button->connect(SceneStringName(pressed), callable_mp(this, &CodeTextEditor::_show_goto_popup_request));
	line_and_col_button->set_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_line"));
	line_and_col_button->set_shortcut_context(this);
	status_bar->add_child(line_and_col_button);

	status_bar->add_child(memnew(VSeparator));

	// Indentation
	indentation_txt = memnew(Label);
	status_bar->add_child(indentation_txt);
	indentation_txt->set_v_size_flags(SIZE_EXPAND | SIZE_SHRINK_CENTER);
	indentation_txt->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
	indentation_txt->set_tooltip_auto_translate_mode(AUTO_TRANSLATE_MODE_ALWAYS);
	indentation_txt->set_tooltip_text(TTRC("Indentation"));
	indentation_txt->set_accessibility_name(TTRC("Indentation"));
	indentation_txt->set_focus_mode(FOCUS_ACCESSIBILITY);
	indentation_txt->set_mouse_filter(MOUSE_FILTER_STOP);

	text_editor->connect(SceneStringName(gui_input), callable_mp(this, &CodeTextEditor::_text_editor_gui_input));
	text_editor->connect("caret_changed", callable_mp(this, &CodeTextEditor::_line_col_changed));
	text_editor->connect(SceneStringName(text_changed), callable_mp(this, &CodeTextEditor::_text_changed));
	text_editor->connect("code_completion_requested", callable_mp(this, &CodeTextEditor::_complete_request));
	TypedArray<String> cs = { ".", ",", "(", "=", "$", "@", "\"", "\'" };
	text_editor->set_code_completion_prefixes(cs);
	idle->connect("timeout", callable_mp(this, &CodeTextEditor::_text_changed_idle_timeout));