1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:27:44 +00:00

PixelPaint: Use box sampling scaling for layer thumbnails

This commit is contained in:
Jelle Raaijmakers 2023-05-19 00:40:29 +02:00 committed by Andreas Kling
parent d6aefb1bf1
commit 81b30ec372

View file

@ -142,10 +142,10 @@ void LayerListWidget::paint_event(GUI::PaintEvent& event)
}
painter.draw_rect(adjusted_rect, palette().color(ColorRole::BaseText));
painter.draw_scaled_bitmap(inner_thumbnail_rect, layer.display_bitmap(), layer.display_bitmap().rect(), 1.0f, Gfx::Painter::ScalingMode::BilinearBlend);
painter.draw_scaled_bitmap(inner_thumbnail_rect, layer.display_bitmap(), layer.display_bitmap().rect(), 1.f, Gfx::Painter::ScalingMode::BoxSampling);
if (is_masked)
painter.draw_scaled_bitmap(inner_mask_thumbnail_rect, *layer.mask_bitmap(), layer.mask_bitmap()->rect(), 1.0f, Gfx::Painter::ScalingMode::BilinearBlend);
painter.draw_scaled_bitmap(inner_mask_thumbnail_rect, *layer.mask_bitmap(), layer.mask_bitmap()->rect(), 1.f, Gfx::Painter::ScalingMode::BoxSampling);
Color border_color = layer.is_visible() ? palette().color(ColorRole::BaseText) : palette().color(ColorRole::DisabledText);