Applications: Round layer rect before drawing outline in PixelPaint

This fixes differences in drawing the layer and image outlines.
This commit is contained in:
Jelle Raaijmakers 2022-03-23 09:42:34 +01:00 committed by Andreas Kling
commit b8a53e4a17
Notes: sideshowbarker 2024-07-17 16:52:29 +09:00

View file

@ -119,9 +119,8 @@ void ImageEditor::paint_event(GUI::PaintEvent& event)
painter.draw_rect(content_rect().inflated(2, 2), Color::Black);
m_image->paint_into(painter, content_rect());
if (m_active_layer && m_show_active_layer_boundary) {
painter.draw_rect(enclosing_int_rect(content_to_frame_rect(m_active_layer->relative_rect())).inflated(2, 2), Color::Black);
}
if (m_active_layer && m_show_active_layer_boundary)
painter.draw_rect(content_to_frame_rect(m_active_layer->relative_rect()).to_rounded<int>().inflated(2, 2), Color::Black);
if (m_show_pixel_grid && scale() > m_pixel_grid_threshold) {
auto event_image_rect = enclosing_int_rect(frame_to_content_rect(event.rect())).inflated(1, 1);