mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
PixelPaint: Draw layer thumbnails with bilinear filtering
This makes them look a little nicer than basic nearest-neighbor.
This commit is contained in:
parent
7047a5ca59
commit
3ab7388754
Notes:
sideshowbarker
2024-07-17 16:23:53 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/3ab7388754
1 changed files with 2 additions and 2 deletions
|
@ -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());
|
||||
painter.draw_scaled_bitmap(inner_thumbnail_rect, layer.display_bitmap(), layer.display_bitmap().rect(), 1.0f, Gfx::Painter::ScalingMode::BilinearBlend);
|
||||
|
||||
if (is_masked)
|
||||
painter.draw_scaled_bitmap(inner_mask_thumbnail_rect, *layer.mask_bitmap(), layer.mask_bitmap()->rect());
|
||||
painter.draw_scaled_bitmap(inner_mask_thumbnail_rect, *layer.mask_bitmap(), layer.mask_bitmap()->rect(), 1.0f, Gfx::Painter::ScalingMode::BilinearBlend);
|
||||
|
||||
Color border_color = layer.is_visible() ? palette().color(ColorRole::BaseText) : palette().color(ColorRole::DisabledText);
|
||||
|
||||
|
|
Loading…
Reference in a new issue