Skip to content

Commit dba3023

Browse files
committed
Merge pull request godotengine#101798 from Chaosus/fix_animation_editor_fps_spinbox
Fix incomplete FPS spinbox display in sprite frames editor
2 parents 5310426 + 0ceb992 commit dba3023

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

editor/plugins/sprite_frames_editor_plugin.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1284,6 +1284,10 @@ void SpriteFramesEditor::_animation_loop_changed() {
12841284
undo_redo->commit_action();
12851285
}
12861286

1287+
void SpriteFramesEditor::_animation_speed_resized() {
1288+
anim_speed->update_minimum_size();
1289+
}
1290+
12871291
void SpriteFramesEditor::_animation_speed_changed(double p_value) {
12881292
if (updating) {
12891293
return;
@@ -1970,6 +1974,8 @@ SpriteFramesEditor::SpriteFramesEditor() {
19701974
anim_speed->set_step(0.01);
19711975
anim_speed->set_custom_arrow_step(1);
19721976
anim_speed->set_tooltip_text(TTR("Animation Speed"));
1977+
anim_speed->get_line_edit()->set_expand_to_text_length_enabled(true);
1978+
anim_speed->get_line_edit()->connect(SceneStringName(resized), callable_mp(this, &SpriteFramesEditor::_animation_speed_resized));
19731979
anim_speed->connect(SceneStringName(value_changed), callable_mp(this, &SpriteFramesEditor::_animation_speed_changed));
19741980
hbc_animlist->add_child(anim_speed);
19751981

editor/plugins/sprite_frames_editor_plugin.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ class SpriteFramesEditor : public HSplitContainer {
222222
void _animation_remove_confirmed();
223223
void _animation_search_text_changed(const String &p_text);
224224
void _animation_loop_changed();
225+
void _animation_speed_resized();
225226
void _animation_speed_changed(double p_value);
226227

227228
void _frame_list_gui_input(const Ref<InputEvent> &p_event);

0 commit comments

Comments
 (0)