summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editor/create_dialog.cpp2
-rw-r--r--editor/editor_asset_installer.cpp2
-rw-r--r--editor/editor_node.cpp2
-rw-r--r--editor/editor_plugin_settings.cpp8
-rw-r--r--editor/editor_settings.cpp2
-rw-r--r--editor/editor_themes.cpp23
-rw-r--r--editor/export_template_manager.cpp8
-rw-r--r--editor/plugins/asset_library_editor_plugin.cpp2
-rw-r--r--editor/plugins/curve_editor_plugin.cpp16
-rw-r--r--editor/plugins/spatial_editor_plugin.cpp89
-rw-r--r--editor/plugins/texture_region_editor_plugin.cpp13
-rw-r--r--editor/project_export.cpp4
-rw-r--r--editor/property_editor.cpp2
-rw-r--r--editor/scene_tree_editor.cpp4
14 files changed, 70 insertions, 107 deletions
diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp
index bb5f5e9175..0305013776 100644
--- a/editor/create_dialog.cpp
+++ b/editor/create_dialog.cpp
@@ -165,7 +165,7 @@ void CreateDialog::add_type(const String &p_type, HashMap<String, TreeItem *> &p
TreeItem *item = search_options->create_item(parent);
item->set_text(0, p_type);
if (!ClassDB::can_instance(p_type)) {
- item->set_custom_color(0, Color(0.5, 0.5, 0.5));
+ item->set_custom_color(0, get_color("disabled_font_color", "Editor"));
item->set_selectable(0, false);
} else {
diff --git a/editor/editor_asset_installer.cpp b/editor/editor_asset_installer.cpp
index a8eee24fe2..1aac697ffd 100644
--- a/editor/editor_asset_installer.cpp
+++ b/editor/editor_asset_installer.cpp
@@ -197,7 +197,7 @@ void EditorAssetInstaller::open(const String &p_path, int p_depth) {
String res_path = "res://" + path;
if (FileAccess::exists(res_path)) {
- ti->set_custom_color(0, Color(1, 0.3, 0.2));
+ ti->set_custom_color(0, get_color("error_color", "Editor"));
ti->set_tooltip(0, res_path + " (Already Exists)");
ti->set_checked(0, false);
} else {
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index dbee190d7e..3069ba97f2 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -3468,7 +3468,7 @@ void EditorNode::_dock_select_draw() {
Color used = Color(0.6, 0.6, 0.6, 0.8);
Color used_selected = Color(0.8, 0.8, 0.8, 0.8);
- Color tab_selected = Color(1, 1, 1, 1);
+ Color tab_selected = theme_base->get_color("mono_color", "Editor");
Color unused = used;
unused.a = 0.4;
Color unusable = unused;
diff --git a/editor/editor_plugin_settings.cpp b/editor/editor_plugin_settings.cpp
index 6732d7048f..8baa56b9b4 100644
--- a/editor/editor_plugin_settings.cpp
+++ b/editor/editor_plugin_settings.cpp
@@ -127,10 +127,10 @@ void EditorPluginSettings::update_plugins() {
item->set_editable(3, true);
if (EditorNode::get_singleton()->is_addon_plugin_enabled(d)) {
- item->set_custom_color(3, Color(0.2, 1, 0.2));
+ item->set_custom_color(3, get_color("success_color", "Editor"));
item->set_range(3, 1);
} else {
- item->set_custom_color(3, Color(1, 0.2, 0.2));
+ item->set_custom_color(3, get_color("disabled_font_color", "Editor"));
item->set_range(3, 0);
}
}
@@ -160,9 +160,9 @@ void EditorPluginSettings::_plugin_activity_changed() {
}
if (is_active)
- ti->set_custom_color(3, Color(0.2, 1, 0.2));
+ ti->set_custom_color(3, get_color("success_color", "Editor"));
else
- ti->set_custom_color(3, Color(1, 0.2, 0.2));
+ ti->set_custom_color(3, get_color("disabled_font_color", "Editor"));
}
void EditorPluginSettings::_bind_methods() {
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index 1b1306e303..e1333d9d82 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -665,7 +665,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
_initial_set("editors/grid_map/pick_distance", 5000.0);
- _initial_set("editors/3d/grid_color", Color(1, 1, 1, 0.2));
+ _initial_set("editors/3d/grid_color", Color::html("808080"));
hints["editors/3d/grid_color"] = PropertyInfo(Variant::COLOR, "editors/3d/grid_color", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
_initial_set("editors/3d/default_fov", 55.0);
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp
index ca337551eb..c38d357cea 100644
--- a/editor/editor_themes.cpp
+++ b/editor/editor_themes.cpp
@@ -296,6 +296,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
const Color highlight_color = Color(mono_color.r, mono_color.g, mono_color.b, 0.2);
theme->set_color("accent_color", "Editor", accent_color);
+ theme->set_color("highlight_color", "Editor", highlight_color);
theme->set_color("base_color", "Editor", base_color);
theme->set_color("dark_color_1", "Editor", dark_color_1);
theme->set_color("dark_color_2", "Editor", dark_color_2);
@@ -304,17 +305,27 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_color("contrast_color_2", "Editor", contrast_color_2);
theme->set_color("font_color", "Editor", font_color);
+ theme->set_color("disabled_font_color", "Editor", font_color_disabled);
- Color success_color = accent_color.linear_interpolate(Color(.6, 1, .6), 0.8);
- Color warning_color = accent_color.linear_interpolate(Color(1, 1, .2), 0.8);
- Color error_color = accent_color.linear_interpolate(Color(1, .2, .2), 0.8);
+ theme->set_color("mono_color", "Editor", mono_color);
+
+ Color success_color = accent_color.linear_interpolate(Color(0.2, 1, 0.2), 0.6) * 1.2;
+ Color warning_color = accent_color.linear_interpolate(Color(1, 1, 0), 0.7);
+ Color error_color = accent_color.linear_interpolate(Color(1, 0, 0), 0.8) * 1.7;
+ if (!dark_theme) {
+ // yellow on white themes is a P.I.T.A.
+ warning_color = accent_color.linear_interpolate(Color(1, 0.8, 0), 0.9);
+ warning_color = warning_color.linear_interpolate(mono_color, 0.2);
+ success_color = success_color.linear_interpolate(mono_color, 0.2);
+ error_color = error_color.linear_interpolate(mono_color, 0.2);
+ }
theme->set_color("success_color", "Editor", success_color);
theme->set_color("warning_color", "Editor", warning_color);
theme->set_color("error_color", "Editor", error_color);
// 2d grid color
- const Color grid_minor_color = Color(font_color.r, font_color.g, font_color.b, 0.1);
- const Color grid_major_color = Color(font_color_disabled.r, font_color_disabled.g, font_color_disabled.b, 0.05);
+ const Color grid_minor_color = mono_color * Color(1.0, 1.0, 1.0, 0.07);
+ const Color grid_major_color = Color(font_color_disabled.r, font_color_disabled.g, font_color_disabled.b, 0.15);
theme->set_color("grid_major_color", "Editor", grid_major_color);
theme->set_color("grid_minor_color", "Editor", grid_minor_color);
@@ -693,6 +704,8 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_stylebox("focus", "TextEdit", style_widget_hover);
theme->set_constant("side_margin", "TabContainer", 0);
theme->set_icon("tab", "TextEdit", theme->get_icon("GuiTab", "EditorIcons"));
+ theme->set_color("font_color", "TextEdit", font_color);
+ theme->set_color("caret_color", "TextEdit", highlight_color);
// H/VSplitContainer
theme->set_stylebox("bg", "VSplitContainer", make_stylebox(theme->get_icon("GuiVsplitBg", "EditorIcons"), 1, 1, 1, 1));
diff --git a/editor/export_template_manager.cpp b/editor/export_template_manager.cpp
index 147d5f90c6..d867404f3d 100644
--- a/editor/export_template_manager.cpp
+++ b/editor/export_template_manager.cpp
@@ -73,7 +73,7 @@ void ExportTemplateManager::_update_template_list() {
current_hb->add_child(current);
if (templates.has(current_version)) {
- current->add_color_override("font_color", Color(0.5, 1, 0.5));
+ current->add_color_override("font_color", get_color("success_color", "Editor"));
Button *redownload = memnew(Button);
redownload->set_text(TTR("Re-Download"));
current_hb->add_child(redownload);
@@ -86,7 +86,7 @@ void ExportTemplateManager::_update_template_list() {
uninstall->connect("pressed", this, "_uninstall_template", varray(current_version));
} else {
- current->add_color_override("font_color", Color(1.0, 0.5, 0.5));
+ current->add_color_override("font_color", get_color("error_color", "Editor"));
Button *redownload = memnew(Button);
redownload->set_text(TTR("Download"));
redownload->connect("pressed", this, "_download_template", varray(current_version));
@@ -98,7 +98,7 @@ void ExportTemplateManager::_update_template_list() {
HBoxContainer *hbc = memnew(HBoxContainer);
Label *version = memnew(Label);
- version->set_modulate(Color(1, 1, 1, 0.7));
+ version->set_modulate(get_color("disabled_font_color", "Editor"));
String text = E->get();
if (text == current_version) {
text += " " + TTR("(Current)");
@@ -299,7 +299,7 @@ void ExportTemplateManager::_install_from_file(const String &p_file) {
void ExportTemplateManager::popup_manager() {
_update_template_list();
- popup_centered_minsize(Size2(400, 600) * EDSCALE);
+ popup_centered_minsize(Size2(400, 400) * EDSCALE);
}
void ExportTemplateManager::ok_pressed() {
diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp
index db3a303a9b..cd53264437 100644
--- a/editor/plugins/asset_library_editor_plugin.cpp
+++ b/editor/plugins/asset_library_editor_plugin.cpp
@@ -1434,7 +1434,7 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) {
error_hb = memnew(HBoxContainer);
library_main->add_child(error_hb);
error_label = memnew(Label);
- error_label->add_color_override("color", Color(1, 0.4, 0.3));
+ error_label->add_color_override("color", get_color("error_color", "Editor"));
error_hb->add_child(error_label);
description = NULL;
diff --git a/editor/plugins/curve_editor_plugin.cpp b/editor/plugins/curve_editor_plugin.cpp
index 70d771afc8..067629c460 100644
--- a/editor/plugins/curve_editor_plugin.cpp
+++ b/editor/plugins/curve_editor_plugin.cpp
@@ -613,8 +613,8 @@ void CurveEditor::_draw() {
Vector2 min_edge = get_world_pos(Vector2(0, view_size.y));
Vector2 max_edge = get_world_pos(Vector2(view_size.x, 0));
- const Color grid_color0(0, 0, 0, 0.5);
- const Color grid_color1(0, 0, 0, 0.15);
+ const Color grid_color0 = get_color("grid_major_color", "Editor");
+ const Color grid_color1 = get_color("grid_minor_color", "Editor");
draw_line(Vector2(min_edge.x, curve.get_min_value()), Vector2(max_edge.x, curve.get_min_value()), grid_color0);
draw_line(Vector2(max_edge.x, curve.get_max_value()), Vector2(min_edge.x, curve.get_max_value()), grid_color0);
draw_line(Vector2(0, min_edge.y), Vector2(0, max_edge.y), grid_color0);
@@ -636,7 +636,7 @@ void CurveEditor::_draw() {
Ref<Font> font = get_font("font", "Label");
float font_height = font->get_height();
- const Color text_color(1, 1, 1, 0.3);
+ const Color text_color = get_color("font_color", "Editor");
{
// X axis
@@ -664,7 +664,7 @@ void CurveEditor::_draw() {
if (_selected_point >= 0) {
- const Color tangent_color(0.5, 0.5, 1, 1);
+ const Color tangent_color = get_color("accent_color", "Editor");
int i = _selected_point;
Vector2 pos = curve.get_point_position(i);
@@ -686,8 +686,8 @@ void CurveEditor::_draw() {
draw_set_transform_matrix(_world_to_view);
- const Color line_color(1, 1, 1, 0.85);
- const Color edge_line_color(1, 1, 1, 0.4);
+ const Color line_color = get_color("highlight_color", "Editor");
+ const Color edge_line_color = get_color("font_color", "Editor");
CanvasItemPlotCurve plot_func(*this, line_color, edge_line_color);
plot_curve_accurate(curve, 4.f / view_size.x, plot_func);
@@ -714,8 +714,8 @@ void CurveEditor::_draw() {
draw_set_transform_matrix(Transform2D());
- const Color point_color(1, 1, 1);
- const Color selected_point_color(1, 0.5, 0.5);
+ const Color point_color = get_color("font_color", "Editor");
+ const Color selected_point_color = get_color("accent_color", "Editor");
for (int i = 0; i < curve.get_point_count(); ++i) {
Vector2 pos = curve.get_point_position(i);
diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp
index 2a6e3b4f0a..5ddd1c5b62 100644
--- a/editor/plugins/spatial_editor_plugin.cpp
+++ b/editor/plugins/spatial_editor_plugin.cpp
@@ -3728,12 +3728,9 @@ void SpatialEditor::_init_indicators() {
indicator_mat.instance();
indicator_mat->set_flag(SpatialMaterial::FLAG_UNSHADED, true);
- //indicator_mat->set_flag(SpatialMaterial::FLAG_ONTOP,true);
indicator_mat->set_flag(SpatialMaterial::FLAG_ALBEDO_FROM_VERTEX_COLOR, true);
indicator_mat->set_flag(SpatialMaterial::FLAG_SRGB_VERTEX_COLOR, true);
- indicator_mat->set_feature(SpatialMaterial::FEATURE_TRANSPARENT, true);
-
PoolVector<Color> grid_colors[3];
PoolVector<Vector3> grid_points[3];
Vector<Color> origin_colors;
@@ -3753,50 +3750,31 @@ void SpatialEditor::_init_indicators() {
origin_colors.push_back(Color(axis.x, axis.y, axis.z));
origin_points.push_back(axis * 4096);
origin_points.push_back(axis * -4096);
-#define ORIGIN_GRID_SIZE 100
+#define ORIGIN_GRID_SIZE 50
for (int j = -ORIGIN_GRID_SIZE; j <= ORIGIN_GRID_SIZE; j++) {
- for (int k = -ORIGIN_GRID_SIZE; k <= ORIGIN_GRID_SIZE; k++) {
-
- Vector3 p = axis_n1 * j + axis_n2 * k;
- float trans = Math::pow(MAX(0, 1.0 - (Vector2(j, k).length() / ORIGIN_GRID_SIZE)), 2);
-
- Vector3 pj = axis_n1 * (j + 1) + axis_n2 * k;
- float transj = Math::pow(MAX(0, 1.0 - (Vector2(j + 1, k).length() / ORIGIN_GRID_SIZE)), 2);
-
- Vector3 pk = axis_n1 * j + axis_n2 * (k + 1);
- float transk = Math::pow(MAX(0, 1.0 - (Vector2(j, k + 1).length() / ORIGIN_GRID_SIZE)), 2);
-
- Color trans_color = grid_color;
- trans_color.a *= trans;
-
- Color transk_color = grid_color;
- transk_color.a *= transk;
+ Vector3 p1 = axis_n1 * j + axis_n2 * -ORIGIN_GRID_SIZE;
+ Vector3 p1_dest = p1 * (-axis_n2 + axis_n1);
+ Vector3 p2 = axis_n2 * j + axis_n1 * -ORIGIN_GRID_SIZE;
+ Vector3 p2_dest = p2 * (-axis_n1 + axis_n2);
- Color transj_color = grid_color;
- transj_color.a *= transj;
-
- if (j % 10 == 0 || k % 10 == 0) {
- trans_color.a *= 2;
- }
- if ((k + 1) % 10 == 0) {
- transk_color.a *= 2;
- }
- if ((j + 1) % 10 == 0) {
- transj_color.a *= 2;
- }
+ Color line_color = grid_color;
+ if (j == 0) {
+ continue;
+ } else if (j % 10 == 0) {
+ line_color *= 1.5;
+ }
- grid_points[i].push_back(p);
- grid_points[i].push_back(pk);
- grid_colors[i].push_back(trans_color);
- grid_colors[i].push_back(transk_color);
+ grid_points[i].push_back(p1);
+ grid_points[i].push_back(p1_dest);
+ grid_colors[i].push_back(line_color);
+ grid_colors[i].push_back(line_color);
- grid_points[i].push_back(p);
- grid_points[i].push_back(pj);
- grid_colors[i].push_back(trans_color);
- grid_colors[i].push_back(transj_color);
- }
+ grid_points[i].push_back(p2);
+ grid_points[i].push_back(p2_dest);
+ grid_colors[i].push_back(line_color);
+ grid_colors[i].push_back(line_color);
}
grid[i] = VisualServer::get_singleton()->mesh_create();
@@ -3840,32 +3818,6 @@ void SpatialEditor::_init_indicators() {
}
{
- cursor_mesh = VisualServer::get_singleton()->mesh_create();
- PoolVector<Vector3> cursor_points;
- float cs = 0.25;
- cursor_points.push_back(Vector3(+cs, 0, 0));
- cursor_points.push_back(Vector3(-cs, 0, 0));
- cursor_points.push_back(Vector3(0, +cs, 0));
- cursor_points.push_back(Vector3(0, -cs, 0));
- cursor_points.push_back(Vector3(0, 0, +cs));
- cursor_points.push_back(Vector3(0, 0, -cs));
- cursor_material.instance();
- cursor_material->set_albedo(Color(0, 1, 1));
- cursor_material->set_flag(SpatialMaterial::FLAG_UNSHADED, true);
-
- Array d;
- d.resize(VS::ARRAY_MAX);
- d[VS::ARRAY_VERTEX] = cursor_points;
- VisualServer::get_singleton()->mesh_add_surface_from_arrays(cursor_mesh, VS::PRIMITIVE_LINES, d);
- VisualServer::get_singleton()->mesh_surface_set_material(cursor_mesh, 0, cursor_material->get_rid());
-
- cursor_instance = VisualServer::get_singleton()->instance_create2(cursor_mesh, get_tree()->get_root()->get_world()->get_scenario());
- VS::get_singleton()->instance_set_layer_mask(cursor_instance, 1 << SpatialEditorViewport::GIZMO_GRID_LAYER);
-
- VisualServer::get_singleton()->instance_geometry_set_cast_shadows_setting(cursor_instance, VS::SHADOW_CASTING_SETTING_OFF);
- }
-
- {
//move gizmo
@@ -4058,9 +4010,6 @@ void SpatialEditor::_finish_indicators() {
//VisualServer::get_singleton()->free(poly);
//VisualServer::get_singleton()->free(indicators_instance);
//VisualServer::get_singleton()->free(indicators);
-
- VisualServer::get_singleton()->free(cursor_instance);
- VisualServer::get_singleton()->free(cursor_mesh);
}
bool SpatialEditor::is_any_freelook_active() const {
diff --git a/editor/plugins/texture_region_editor_plugin.cpp b/editor/plugins/texture_region_editor_plugin.cpp
index 41c2c61d82..3370ce51fd 100644
--- a/editor/plugins/texture_region_editor_plugin.cpp
+++ b/editor/plugins/texture_region_editor_plugin.cpp
@@ -39,7 +39,7 @@
void draw_margin_line(Control *edit_draw, Vector2 from, Vector2 to) {
Vector2 line = (to - from).normalized() * 10;
while ((to - from).length_squared() > 200) {
- edit_draw->draw_line(from, from + line, Color(0.97, 0.2, 0.2), 2);
+ edit_draw->draw_line(from, from + line, EditorNode::get_singleton()->get_theme_base()->get_color("mono_color", "Editor"), 2);
from += line * 2;
}
}
@@ -66,6 +66,7 @@ void TextureRegionEditor::_region_draw() {
VS::get_singleton()->canvas_item_add_set_transform(edit_draw->get_canvas_item(), Transform2D());
if (snap_mode == SNAP_GRID) {
+ Color grid_color = get_color("grid_major_color", "Editor");
Size2 s = edit_draw->get_size();
int last_cell = 0;
@@ -76,7 +77,7 @@ void TextureRegionEditor::_region_draw() {
if (i == 0)
last_cell = cell;
if (last_cell != cell)
- edit_draw->draw_line(Point2(i, 0), Point2(i, s.height), Color(0.3, 0.7, 1, 0.3));
+ edit_draw->draw_line(Point2(i, 0), Point2(i, s.height), grid_color);
last_cell = cell;
}
else
@@ -85,7 +86,7 @@ void TextureRegionEditor::_region_draw() {
if (i == 0)
last_cell = cell;
if (last_cell != cell)
- edit_draw->draw_rect(Rect2(i - snap_separation.x * draw_zoom, 0, snap_separation.x * draw_zoom, s.height), Color(0.3, 0.7, 1, 0.3));
+ edit_draw->draw_rect(Rect2(i - snap_separation.x * draw_zoom, 0, snap_separation.x * draw_zoom, s.height), grid_color);
last_cell = cell;
}
}
@@ -97,7 +98,7 @@ void TextureRegionEditor::_region_draw() {
if (i == 0)
last_cell = cell;
if (last_cell != cell)
- edit_draw->draw_line(Point2(0, i), Point2(s.width, i), Color(0.3, 0.7, 1, 0.3));
+ edit_draw->draw_line(Point2(0, i), Point2(s.width, i), grid_color);
last_cell = cell;
}
else
@@ -106,7 +107,7 @@ void TextureRegionEditor::_region_draw() {
if (i == 0)
last_cell = cell;
if (last_cell != cell)
- edit_draw->draw_rect(Rect2(0, i - snap_separation.y * draw_zoom, s.width, snap_separation.y * draw_zoom), Color(0.3, 0.7, 1, 0.3));
+ edit_draw->draw_rect(Rect2(0, i - snap_separation.y * draw_zoom, s.width, snap_separation.y * draw_zoom), grid_color);
last_cell = cell;
}
}
@@ -137,7 +138,7 @@ void TextureRegionEditor::_region_draw() {
mtx.basis_xform(rect.position + rect.size),
mtx.basis_xform(rect.position + Vector2(0, rect.size.y))
};
- Color color(0.9, 0.5, 0.5);
+ Color color = get_color("mono_color", "Editor");
for (int i = 0; i < 4; i++) {
int prev = (i + 3) % 4;
diff --git a/editor/project_export.cpp b/editor/project_export.cpp
index 506619a2a7..fafd6805ca 100644
--- a/editor/project_export.cpp
+++ b/editor/project_export.cpp
@@ -929,7 +929,7 @@ ProjectExportDialog::ProjectExportDialog() {
export_error = memnew(Label);
main_vb->add_child(export_error);
export_error->hide();
- export_error->add_color_override("font_color", Color(1, 0.5, 0.5));
+ export_error->add_color_override("font_color", get_color("error_color", "Editor"));
export_templates_error = memnew(HBoxContainer);
main_vb->add_child(export_templates_error);
@@ -937,7 +937,7 @@ ProjectExportDialog::ProjectExportDialog() {
Label *export_error2 = memnew(Label);
export_templates_error->add_child(export_error2);
- export_error2->add_color_override("font_color", Color(1, 0.5, 0.5));
+ export_error2->add_color_override("font_color", get_color("error_color", "Editor"));
export_error2->set_text(" - " + TTR("Export templates for this platform are missing:") + " ");
LinkButton *download_templates = memnew(LinkButton);
diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp
index ed90c8c4b2..fcae4c04fb 100644
--- a/editor/property_editor.cpp
+++ b/editor/property_editor.cpp
@@ -2433,7 +2433,7 @@ bool PropertyEditor::_is_drop_valid(const Dictionary &p_drag_data, const Diction
void PropertyEditor::_mark_drop_fields(TreeItem *p_at) {
if (_is_drop_valid(get_viewport()->gui_get_drag_data(), p_at->get_metadata(0)))
- p_at->set_custom_bg_color(1, Color(0.7, 0.5, 0.2), true);
+ p_at->set_custom_bg_color(1, get_color("accent_color", "Editor"), true);
if (p_at->get_children()) {
_mark_drop_fields(p_at->get_children());
diff --git a/editor/scene_tree_editor.cpp b/editor/scene_tree_editor.cpp
index cfc563f470..6dcd5e54ec 100644
--- a/editor/scene_tree_editor.cpp
+++ b/editor/scene_tree_editor.cpp
@@ -185,7 +185,7 @@ bool SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent) {
if (part_of_subscene) {
//item->set_selectable(0,marked_selectable);
- item->set_custom_color(0, get_color("error_color", "Editor").linear_interpolate(get_color("warning_color", "Editor"), 0.4));
+ item->set_custom_color(0, get_color("disabled_font_color", "Editor"));
} else if (marked.has(p_node)) {
@@ -345,7 +345,7 @@ void SceneTreeEditor::_update_visibility_color(Node *p_node, TreeItem *p_item) {
Color color(1, 1, 1, 1);
bool visible_on_screen = p_node->call("is_visible_in_tree");
if (!visible_on_screen) {
- color = Color(0.6, 0.6, 0.6, 1);
+ color.a = 0.6;
}
int idx = p_item->get_button_by_id(0, BUTTON_VISIBILITY);
p_item->set_button_color(0, idx, color);