summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-09-03 14:40:45 +0200
committerGitHub <noreply@github.com>2020-09-03 14:40:45 +0200
commit2da7d2c172a18a7e623cd7c137e15e35a133c0b6 (patch)
tree67f48c48579887fbba38e0cfd61684a0b3685467
parent315ee66f4e80acb9fd1fe67c13aa9db3e08ffba6 (diff)
parent2427a9cafcfba050b951d0a21e60b08b6a9d17f7 (diff)
Merge pull request #41050 from Calinou/spriteframes-editor-compact
Make the SpriteFrames animation speed SpinBox take less vertical space
-rw-r--r--editor/plugins/sprite_frames_editor_plugin.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp
index 18942b371c..5007983581 100644
--- a/editor/plugins/sprite_frames_editor_plugin.cpp
+++ b/editor/plugins/sprite_frames_editor_plugin.cpp
@@ -995,11 +995,16 @@ SpriteFramesEditor::SpriteFramesEditor() {
animations->connect("item_edited", callable_mp(this, &SpriteFramesEditor::_animation_name_edited));
animations->set_allow_reselect(true);
+ HBoxContainer *hbc_anim_speed = memnew(HBoxContainer);
+ hbc_anim_speed->add_child(memnew(Label(TTR("Speed:"))));
+ vbc_animlist->add_child(hbc_anim_speed);
anim_speed = memnew(SpinBox);
- vbc_animlist->add_margin_child(TTR("Speed (FPS):"), anim_speed);
+ anim_speed->set_suffix(TTR("FPS"));
anim_speed->set_min(0);
anim_speed->set_max(100);
anim_speed->set_step(0.01);
+ anim_speed->set_h_size_flags(SIZE_EXPAND_FILL);
+ hbc_anim_speed->add_child(anim_speed);
anim_speed->connect("value_changed", callable_mp(this, &SpriteFramesEditor::_animation_fps_changed));
anim_loop = memnew(CheckButton);