mirror of
https://github.com/godotengine/godot.git
synced 2024-11-22 12:12:28 +00:00
EditorSettings: Move scene tab options to their dedicated category
Fixes #14870.
This commit is contained in:
parent
045f81023b
commit
03823f12c5
@ -115,7 +115,7 @@ EditorNode *EditorNode::singleton = NULL;
|
||||
|
||||
void EditorNode::_update_scene_tabs() {
|
||||
|
||||
bool show_rb = EditorSettings::get_singleton()->get("interface/editor/show_script_in_scene_tabs");
|
||||
bool show_rb = EditorSettings::get_singleton()->get("interface/scene_tabs/show_script_button");
|
||||
|
||||
scene_tabs->clear_tabs();
|
||||
Ref<Texture> script_icon = gui_base->get_icon("Script", "EditorIcons");
|
||||
@ -305,7 +305,7 @@ void EditorNode::_notification(int p_what) {
|
||||
}
|
||||
|
||||
if (p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) {
|
||||
scene_tabs->set_tab_close_display_policy((bool(EDITOR_DEF("interface/editor/always_show_close_button_in_scene_tabs", false)) ? Tabs::CLOSE_BUTTON_SHOW_ALWAYS : Tabs::CLOSE_BUTTON_SHOW_ACTIVE_ONLY));
|
||||
scene_tabs->set_tab_close_display_policy((bool(EDITOR_DEF("interface/scene_tabs/always_show_close_button", false)) ? Tabs::CLOSE_BUTTON_SHOW_ALWAYS : Tabs::CLOSE_BUTTON_SHOW_ACTIVE_ONLY));
|
||||
Ref<Theme> theme = create_editor_theme(theme_base->get_theme());
|
||||
|
||||
theme_base->set_theme(theme);
|
||||
@ -4994,7 +4994,7 @@ EditorNode::EditorNode() {
|
||||
scene_tabs->add_style_override("tab_bg", gui_base->get_stylebox("SceneTabBG", "EditorStyles"));
|
||||
scene_tabs->add_tab("unsaved");
|
||||
scene_tabs->set_tab_align(Tabs::ALIGN_LEFT);
|
||||
scene_tabs->set_tab_close_display_policy((bool(EDITOR_DEF("interface/editor/always_show_close_button_in_scene_tabs", false)) ? Tabs::CLOSE_BUTTON_SHOW_ALWAYS : Tabs::CLOSE_BUTTON_SHOW_ACTIVE_ONLY));
|
||||
scene_tabs->set_tab_close_display_policy((bool(EDITOR_DEF("interface/scene_tabs/always_show_close_button", false)) ? Tabs::CLOSE_BUTTON_SHOW_ALWAYS : Tabs::CLOSE_BUTTON_SHOW_ACTIVE_ONLY));
|
||||
scene_tabs->set_min_width(int(EDITOR_DEF("interface/scene_tabs/minimum_width", 50)) * EDSCALE);
|
||||
scene_tabs->connect("tab_changed", this, "_scene_tab_changed");
|
||||
scene_tabs->connect("right_button_pressed", this, "_scene_tab_script_edited");
|
||||
|
@ -258,7 +258,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
|
||||
|
||||
_initial_set("interface/editor/hidpi_mode", 0);
|
||||
hints["interface/editor/hidpi_mode"] = PropertyInfo(Variant::INT, "interface/editor/hidpi_mode", PROPERTY_HINT_ENUM, "Auto,VeryLoDPI,LoDPI,MidDPI,HiDPI", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
|
||||
_initial_set("interface/editor/show_script_in_scene_tabs", false);
|
||||
_initial_set("interface/scene_tabs/show_script_button", false);
|
||||
_initial_set("interface/editor/font_size", 14);
|
||||
hints["interface/editor/font_size"] = PropertyInfo(Variant::INT, "interface/editor/font_size", PROPERTY_HINT_RANGE, "10,40,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
|
||||
_initial_set("interface/editor/source_font_size", 14);
|
||||
@ -307,7 +307,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
|
||||
hints["filesystem/directories/default_project_path"] = PropertyInfo(Variant::STRING, "filesystem/directories/default_project_path", PROPERTY_HINT_GLOBAL_DIR);
|
||||
_initial_set("filesystem/directories/default_project_export_path", "");
|
||||
hints["filesystem/directories/default_project_export_path"] = PropertyInfo(Variant::STRING, "filesystem/directories/default_project_export_path", PROPERTY_HINT_GLOBAL_DIR);
|
||||
_initial_set("interface/editor/show_script_in_scene_tabs", false);
|
||||
_initial_set("interface/scene_tabs/show_script_button", false);
|
||||
|
||||
_initial_set("text_editor/theme/color_theme", "Adaptive");
|
||||
hints["text_editor/theme/color_theme"] = PropertyInfo(Variant::STRING, "text_editor/theme/color_theme", PROPERTY_HINT_ENUM, "Adaptive,Default");
|
||||
|
Loading…
Reference in New Issue
Block a user