diff --git a/app/scenes/components/bookmark.tscn b/app/scenes/components/bookmark.tscn index 2712452..5f99799 100644 --- a/app/scenes/components/bookmark.tscn +++ b/app/scenes/components/bookmark.tscn @@ -95,7 +95,6 @@ mouse_filter = 2 theme_override_styles/panel = SubResource("StyleBoxFlat_od0ga") [node name="Icon" type="TextureRect" parent="JumpAnimation/Mask"] -custom_minimum_size = Vector2(40, 40) layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 diff --git a/app/scripts/loading/file_tools.gd b/app/scripts/loading/file_tools.gd index d530c38..a5f6c63 100644 --- a/app/scripts/loading/file_tools.gd +++ b/app/scripts/loading/file_tools.gd @@ -30,18 +30,6 @@ static func load_external_tex(path: String) -> Texture2D: if path.begins_with("res://"): return load(path) if not FileAccess.file_exists(path): return null - var file = FileAccess.open(path, FileAccess.READ) - var bytes = file.get_buffer(file.get_length()) - var image = Image.new() - match path.get_extension(): - "png": - image.load_png_from_buffer(bytes) - "jpeg", "jpg": - image.load_jpg_from_buffer(bytes) - "webp": - image.load_webp_from_buffer(bytes) - "bmp": - image.load_bmp_from_buffer(bytes) - _: - return null + var image = Image.load_from_file(path) + if not is_instance_valid(image): return null return ImageTexture.create_from_image(image) as Texture2D