diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-10-27 13:24:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-27 13:24:43 +0200 |
commit | ad85224ebcf7bbad5565457d355c429b02190c58 (patch) | |
tree | 5ba46f3e8fa6b5487b959cc3614a8e57fbc9ecfc | |
parent | 3fe72c7f77da5f7ce6574e5ea05911bc4ef9e5e8 (diff) | |
parent | 6c889a3ab5d1da8efc8662eae89863068c5d5d29 (diff) |
Merge pull request #12432 from larsonjj/fix/property_editor_action_buttons
Fix editor action button layout
-rw-r--r-- | editor/property_editor.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp index 3fbd0bbcf3..b676d74879 100644 --- a/editor/property_editor.cpp +++ b/editor/property_editor.cpp @@ -1767,18 +1767,18 @@ void CustomPropertyEditor::_focus_exit() { void CustomPropertyEditor::config_action_buttons(const List<String> &p_strings) { int w = 100; - int h = 18; + int h = 60; int m = 5; - set_size(Size2(w, m * 2 + (h + m) * p_strings.size())); + set_size(Size2((m * 2 + w) * p_strings.size() - m, h)); for (int i = 0; i < MAX_ACTION_BUTTONS; i++) { if (i < p_strings.size()) { action_buttons[i]->show(); action_buttons[i]->set_text(p_strings[i]); - action_buttons[i]->set_position(Point2(m, m + i * (h + m))); - action_buttons[i]->set_size(Size2(w - m * 2, h)); + action_buttons[i]->set_position(Point2(m + i * (w + m), m)); + action_buttons[i]->set_size(Size2(w, h - m * 2)); action_buttons[i]->set_flat(true); } else { action_buttons[i]->hide(); |