diff options
Diffstat (limited to 'editor/plugins/sprite_frames_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/sprite_frames_editor_plugin.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp index a1241ae662..2476d28986 100644 --- a/editor/plugins/sprite_frames_editor_plugin.cpp +++ b/editor/plugins/sprite_frames_editor_plugin.cpp @@ -35,12 +35,12 @@ #include "core/os/keyboard.h" #include "editor/editor_file_system.h" #include "editor/editor_node.h" -#include "editor/editor_scale.h" #include "editor/editor_settings.h" #include "editor/editor_string_names.h" #include "editor/editor_undo_redo_manager.h" #include "editor/gui/editor_file_dialog.h" #include "editor/scene_tree_dock.h" +#include "editor/themes/editor_scale.h" #include "scene/gui/center_container.h" #include "scene/gui/flow_container.h" #include "scene/gui/margin_container.h" @@ -1425,7 +1425,7 @@ bool SpriteFramesEditor::can_drop_data_fw(const Point2 &p_point, const Variant & } for (int i = 0; i < files.size(); i++) { - String f = files[i]; + const String &f = files[i]; String ftype = EditorFileSystem::get_singleton()->get_file_type(f); if (!ClassDB::is_parent_class(ftype, "Texture2D")) { @@ -1880,6 +1880,7 @@ SpriteFramesEditor::SpriteFramesEditor() { add_child(file); frame_list = memnew(ItemList); + frame_list->set_auto_translate(false); frame_list->set_v_size_flags(SIZE_EXPAND_FILL); frame_list->set_icon_mode(ItemList::ICON_MODE_TOP); frame_list->set_texture_filter(TEXTURE_FILTER_NEAREST_WITH_MIPMAPS); @@ -2177,7 +2178,7 @@ SpriteFramesEditor::SpriteFramesEditor() { min_thumbnail_zoom = 0.1f * MAX(1.0f, EDSCALE); // Default the zoom to match the editor scale, but don't dezoom on editor scales below 100% to prevent pixel art from looking bad. sheet_zoom = MAX(1.0f, EDSCALE); - max_sheet_zoom = 16.0f * MAX(1.0f, EDSCALE); + max_sheet_zoom = 128.0f * MAX(1.0f, EDSCALE); min_sheet_zoom = 0.01f * MAX(1.0f, EDSCALE); _zoom_reset(); |