1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-12 13:20:55 +00:00

Merge pull request #44864 from Calinou/editor-array-dictionary-increase-page-size

Increase the page size for array/dictionary editors to 20
This commit is contained in:
Rémi Verschelde
2021-02-19 19:53:35 +01:00
committed by GitHub
3 changed files with 10 additions and 8 deletions

View File

@@ -573,8 +573,7 @@ void EditorPropertyArray::_bind_methods() {
EditorPropertyArray::EditorPropertyArray() { EditorPropertyArray::EditorPropertyArray() {
object.instance(); object.instance();
page_idx = 0; page_len = int(EDITOR_GET("interface/inspector/max_array_dictionary_items_per_page"));
page_len = 10;
edit = memnew(Button); edit = memnew(Button);
edit->set_flat(true); edit->set_flat(true);
edit->set_h_size_flags(SIZE_EXPAND_FILL); edit->set_h_size_flags(SIZE_EXPAND_FILL);
@@ -1069,8 +1068,7 @@ void EditorPropertyDictionary::_bind_methods() {
EditorPropertyDictionary::EditorPropertyDictionary() { EditorPropertyDictionary::EditorPropertyDictionary() {
object.instance(); object.instance();
page_idx = 0; page_len = int(EDITOR_GET("interface/inspector/max_array_dictionary_items_per_page"));
page_len = 10;
edit = memnew(Button); edit = memnew(Button);
edit->set_flat(true); edit->set_flat(true);
edit->set_h_size_flags(SIZE_EXPAND_FILL); edit->set_h_size_flags(SIZE_EXPAND_FILL);

View File

@@ -84,8 +84,8 @@ class EditorPropertyArray : public EditorProperty {
bool dropping; bool dropping;
Ref<EditorPropertyArrayObject> object; Ref<EditorPropertyArrayObject> object;
int page_len; int page_len = 20;
int page_idx; int page_idx = 0;
int changing_type_idx; int changing_type_idx;
Button *edit; Button *edit;
VBoxContainer *vbox; VBoxContainer *vbox;
@@ -129,8 +129,8 @@ class EditorPropertyDictionary : public EditorProperty {
bool updating; bool updating;
Ref<EditorPropertyDictionaryObject> object; Ref<EditorPropertyDictionaryObject> object;
int page_len; int page_len = 20;
int page_idx; int page_idx = 0;
int changing_type_idx; int changing_type_idx;
Button *edit; Button *edit;
VBoxContainer *vbox; VBoxContainer *vbox;

View File

@@ -431,6 +431,10 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
_initial_set("interface/editor/hide_console_window", false); _initial_set("interface/editor/hide_console_window", false);
_initial_set("interface/editor/save_each_scene_on_quit", true); // Regression _initial_set("interface/editor/save_each_scene_on_quit", true); // Regression
// Inspector
_initial_set("interface/inspector/max_array_dictionary_items_per_page", 20);
hints["interface/inspector/max_array_dictionary_items_per_page"] = PropertyInfo(Variant::INT, "interface/inspector/max_array_dictionary_items_per_page", PROPERTY_HINT_RANGE, "10,100,1", PROPERTY_USAGE_DEFAULT);
// Theme // Theme
_initial_set("interface/theme/preset", "Default"); _initial_set("interface/theme/preset", "Default");
hints["interface/theme/preset"] = PropertyInfo(Variant::STRING, "interface/theme/preset", PROPERTY_HINT_ENUM, "Default,Alien,Arc,Godot 2,Grey,Light,Solarized (Dark),Solarized (Light),Custom", PROPERTY_USAGE_DEFAULT); hints["interface/theme/preset"] = PropertyInfo(Variant::STRING, "interface/theme/preset", PROPERTY_HINT_ENUM, "Default,Alien,Arc,Godot 2,Grey,Light,Solarized (Dark),Solarized (Light),Custom", PROPERTY_USAGE_DEFAULT);