From 66f52d6db9b4fbc26668b6d4ea0d06807e38d46b Mon Sep 17 00:00:00 2001 From: Lucas CHOLLET Date: Sun, 14 Jan 2024 14:50:28 -0500 Subject: [PATCH] LibGUI: Use BoxSampling to draw thumbnails --- Userland/Libraries/LibGUI/FileSystemModel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibGUI/FileSystemModel.cpp b/Userland/Libraries/LibGUI/FileSystemModel.cpp index 99880d1356..422c77a2b7 100644 --- a/Userland/Libraries/LibGUI/FileSystemModel.cpp +++ b/Userland/Libraries/LibGUI/FileSystemModel.cpp @@ -732,7 +732,7 @@ static ErrorOr> render_thumbnail(StringView path) auto destination = Gfx::IntRect(0, 0, (int)(bitmap->width() * scale), (int)(bitmap->height() * scale)).centered_within(thumbnail->rect()); Painter painter(thumbnail); - painter.draw_scaled_bitmap(destination, *bitmap, bitmap->rect()); + painter.draw_scaled_bitmap(destination, *bitmap, bitmap->rect(), 1.f, Painter::ScalingMode::BoxSampling); return thumbnail; }