1
0
Fork 0
This commit is contained in:
bruvzg 2025-02-28 01:36:01 +01:00 committed by GitHub
commit 8a7e5795d5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 12 deletions

View File

@ -412,7 +412,7 @@ void EditorPropertyArray::update_property() {
edit->set_text_overrun_behavior(TextServer::OVERRUN_TRIM_ELLIPSIS);
edit->set_text_alignment(HORIZONTAL_ALIGNMENT_LEFT);
edit->set_button_icon(get_editor_theme_icon(array_type_name));
edit->set_text(vformat("%s%s", array_sub_type_name, ctr_str));
edit->set_text(vformat("%s(%d) - %s", array_sub_type_name, size, ctr_str));
edit->set_tooltip_text(vformat(TTR("%s%s (size %d)"), array_type_name, array_sub_type_name, size));
} else {
edit->set_text_alignment(HORIZONTAL_ALIGNMENT_CENTER);
@ -1190,7 +1190,7 @@ void EditorPropertyDictionary::update_property() {
edit->set_text_overrun_behavior(TextServer::OVERRUN_TRIM_ELLIPSIS);
edit->set_text_alignment(HORIZONTAL_ALIGNMENT_LEFT);
edit->set_button_icon(get_editor_theme_icon(dict_type_name));
edit->set_text(vformat("%s%s", dict_sub_type_name, ctr_str));
edit->set_text(vformat("%s(%d) - %s", dict_sub_type_name, dict.size(), ctr_str));
edit->set_tooltip_text(vformat(TTR("%s%s (size %d)"), dict_type_name, dict_sub_type_name, dict.size()));
} else {
edit->set_text_alignment(HORIZONTAL_ALIGNMENT_CENTER);
@ -1288,14 +1288,6 @@ void EditorPropertyDictionary::update_property() {
new_prop->set_use_folding(is_using_folding());
new_prop->set_h_size_flags(SIZE_EXPAND_FILL);
new_prop->set_draw_label(false);
EditorPropertyArray *arr_prop = Object::cast_to<EditorPropertyArray>(new_prop);
if (arr_prop) {
arr_prop->set_preview_value(true);
}
EditorPropertyDictionary *dict_prop = Object::cast_to<EditorPropertyDictionary>(new_prop);
if (dict_prop) {
dict_prop->set_preview_value(true);
}
slot.set_key_prop(new_prop);
}
}

View File

@ -115,7 +115,7 @@ class EditorPropertyArray : public EditorProperty {
PopupMenu *change_type = nullptr;
bool preview_value = false;
bool preview_value = true;
int page_length = 20;
int page_index = 0;
int changing_type_index = EditorPropertyArrayObject::NOT_CHANGING_TYPE;
@ -228,7 +228,7 @@ class EditorPropertyDictionary : public EditorProperty {
PopupMenu *change_type = nullptr;
bool updating = false;
bool preview_value = false;
bool preview_value = true;
Ref<EditorPropertyDictionaryObject> object;
int page_length = 20;
int page_index = 0;