@@ -310,7 +310,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
|
||||
_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");
|
||||
hints["text_editor/theme/color_theme"] = PropertyInfo(Variant::STRING, "text_editor/theme/color_theme", PROPERTY_HINT_ENUM, "Adaptive,Default,Custom");
|
||||
|
||||
_initial_set("text_editor/theme/line_spacing", 4);
|
||||
|
||||
@@ -1141,13 +1141,13 @@ void EditorSettings::load_favorites() {
|
||||
}
|
||||
|
||||
void EditorSettings::list_text_editor_themes() {
|
||||
String themes = "Adaptive,Default";
|
||||
String themes = "Adaptive,Default,Custom";
|
||||
DirAccess *d = DirAccess::open(get_text_editor_themes_dir());
|
||||
if (d) {
|
||||
d->list_dir_begin();
|
||||
String file = d->get_next();
|
||||
while (file != String()) {
|
||||
if (file.get_extension() == "tet" && file.get_basename().to_lower() != "default" && file.get_basename().to_lower() != "adaptive") {
|
||||
if (file.get_extension() == "tet" && file.get_basename().to_lower() != "default" && file.get_basename().to_lower() != "adaptive" && file.get_basename().to_lower() != "custom") {
|
||||
themes += "," + file.get_basename();
|
||||
}
|
||||
file = d->get_next();
|
||||
@@ -1159,7 +1159,7 @@ void EditorSettings::list_text_editor_themes() {
|
||||
}
|
||||
|
||||
void EditorSettings::load_text_editor_theme() {
|
||||
if (get("text_editor/theme/color_theme") == "Default" || get("text_editor/theme/color_theme") == "Adaptive") {
|
||||
if (get("text_editor/theme/color_theme") == "Default" || get("text_editor/theme/color_theme") == "Adaptive" || get("text_editor/theme/color_theme") == "Custom") {
|
||||
_load_default_text_editor_theme(); // sorry for "Settings changed" console spam
|
||||
return;
|
||||
}
|
||||
@@ -1216,7 +1216,7 @@ bool EditorSettings::save_text_editor_theme() {
|
||||
|
||||
String p_file = get("text_editor/theme/color_theme");
|
||||
|
||||
if (p_file.get_file().to_lower() == "default" || p_file.get_file().to_lower() == "adaptive") {
|
||||
if (p_file.get_file().to_lower() == "default" || p_file.get_file().to_lower() == "adaptive" || p_file.get_file().to_lower() == "custom") {
|
||||
return false;
|
||||
}
|
||||
String theme_path = get_text_editor_themes_dir().plus_file(p_file + ".tet");
|
||||
@@ -1228,7 +1228,7 @@ bool EditorSettings::save_text_editor_theme_as(String p_file) {
|
||||
p_file += ".tet";
|
||||
}
|
||||
|
||||
if (p_file.get_file().to_lower() == "default.tet" || p_file.get_file().to_lower() == "adaptive.tet") {
|
||||
if (p_file.get_file().to_lower() == "default.tet" || p_file.get_file().to_lower() == "adaptive.tet" || p_file.get_file().to_lower() == "custom.tet") {
|
||||
return false;
|
||||
}
|
||||
if (_save_text_editor_theme(p_file)) {
|
||||
|
||||
Reference in New Issue
Block a user