diff options
Diffstat (limited to 'editor/editor_properties.cpp')
-rw-r--r-- | editor/editor_properties.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp index 68a3fabe1e..1a4d507eef 100644 --- a/editor/editor_properties.cpp +++ b/editor/editor_properties.cpp @@ -1185,7 +1185,7 @@ void EditorPropertyLayers::_button_pressed() { } Rect2 gp = button->get_screen_rect(); - layers->set_as_minsize(); + layers->reset_size(); Vector2 popup_pos = gp.position - Vector2(layers->get_contents_minimum_size().x, 0); layers->set_position(popup_pos); layers->popup(); @@ -1626,7 +1626,7 @@ void EditorPropertyVector2::_notification(int p_what) { case NOTIFICATION_THEME_CHANGED: { const Color *colors = _get_property_colors(); for (int i = 0; i < 2; i++) { - spin[i]->set_custom_label_color(true, colors[i]); + spin[i]->add_theme_color_override("label_color", colors[i]); } } break; } @@ -1720,7 +1720,7 @@ void EditorPropertyRect2::_notification(int p_what) { case NOTIFICATION_THEME_CHANGED: { const Color *colors = _get_property_colors(); for (int i = 0; i < 4; i++) { - spin[i]->set_custom_label_color(true, colors[i % 2]); + spin[i]->add_theme_color_override("label_color", colors[i % 2]); } } break; } @@ -1849,7 +1849,7 @@ void EditorPropertyVector3::_notification(int p_what) { case NOTIFICATION_THEME_CHANGED: { const Color *colors = _get_property_colors(); for (int i = 0; i < 3; i++) { - spin[i]->set_custom_label_color(true, colors[i]); + spin[i]->add_theme_color_override("label_color", colors[i]); } } break; } @@ -1939,7 +1939,7 @@ void EditorPropertyVector2i::_notification(int p_what) { case NOTIFICATION_THEME_CHANGED: { const Color *colors = _get_property_colors(); for (int i = 0; i < 2; i++) { - spin[i]->set_custom_label_color(true, colors[i]); + spin[i]->add_theme_color_override("label_color", colors[i]); } } break; } @@ -2033,7 +2033,7 @@ void EditorPropertyRect2i::_notification(int p_what) { case NOTIFICATION_THEME_CHANGED: { const Color *colors = _get_property_colors(); for (int i = 0; i < 4; i++) { - spin[i]->set_custom_label_color(true, colors[i % 2]); + spin[i]->add_theme_color_override("label_color", colors[i % 2]); } } break; } @@ -2135,7 +2135,7 @@ void EditorPropertyVector3i::_notification(int p_what) { case NOTIFICATION_THEME_CHANGED: { const Color *colors = _get_property_colors(); for (int i = 0; i < 3; i++) { - spin[i]->set_custom_label_color(true, colors[i]); + spin[i]->add_theme_color_override("label_color", colors[i]); } } break; } @@ -2228,7 +2228,7 @@ void EditorPropertyPlane::_notification(int p_what) { case NOTIFICATION_THEME_CHANGED: { const Color *colors = _get_property_colors(); for (int i = 0; i < 4; i++) { - spin[i]->set_custom_label_color(true, colors[i]); + spin[i]->add_theme_color_override("label_color", colors[i]); } } break; } @@ -2322,7 +2322,7 @@ void EditorPropertyQuaternion::_notification(int p_what) { case NOTIFICATION_THEME_CHANGED: { const Color *colors = _get_property_colors(); for (int i = 0; i < 4; i++) { - spin[i]->set_custom_label_color(true, colors[i]); + spin[i]->add_theme_color_override("label_color", colors[i]); } } break; } @@ -2419,7 +2419,7 @@ void EditorPropertyAABB::_notification(int p_what) { case NOTIFICATION_THEME_CHANGED: { const Color *colors = _get_property_colors(); for (int i = 0; i < 6; i++) { - spin[i]->set_custom_label_color(true, colors[i % 3]); + spin[i]->add_theme_color_override("label_color", colors[i % 3]); } } break; } @@ -2505,9 +2505,9 @@ void EditorPropertyTransform2D::_notification(int p_what) { for (int i = 0; i < 6; i++) { // For Transform2D, use the 4th color (cyan) for the origin vector. if (i % 3 == 2) { - spin[i]->set_custom_label_color(true, colors[3]); + spin[i]->add_theme_color_override("label_color", colors[3]); } else { - spin[i]->set_custom_label_color(true, colors[i % 3]); + spin[i]->add_theme_color_override("label_color", colors[i % 3]); } } } break; @@ -2599,7 +2599,7 @@ void EditorPropertyBasis::_notification(int p_what) { case NOTIFICATION_THEME_CHANGED: { const Color *colors = _get_property_colors(); for (int i = 0; i < 9; i++) { - spin[i]->set_custom_label_color(true, colors[i % 3]); + spin[i]->add_theme_color_override("label_color", colors[i % 3]); } } break; } @@ -2696,7 +2696,7 @@ void EditorPropertyTransform3D::_notification(int p_what) { case NOTIFICATION_THEME_CHANGED: { const Color *colors = _get_property_colors(); for (int i = 0; i < 12; i++) { - spin[i]->set_custom_label_color(true, colors[i % 4]); + spin[i]->add_theme_color_override("label_color", colors[i % 4]); } } break; } @@ -3059,7 +3059,7 @@ void EditorPropertyResource::_sub_inspector_property_keyed(const String &p_prope // The second parameter could be null, causing the event to fire with less arguments, so use the pointer call which preserves it. const Variant args[3] = { String(get_edited_property()) + ":" + p_property, p_value, p_advance }; const Variant *argp[3] = { &args[0], &args[1], &args[2] }; - emit_signal(SNAME("property_keyed_with_value"), argp, 3); + emit_signalp(SNAME("property_keyed_with_value"), argp, 3); } void EditorPropertyResource::_sub_inspector_resource_selected(const RES &p_resource, const String &p_property) { |