Applications: Paint transparency grids through StylePainter

This commit is contained in:
Tibor Nagy 2020-09-25 16:33:36 +02:00 committed by Andreas Kling
parent 7ab04ea31a
commit 59a0e5ba1e
Notes: sideshowbarker 2024-07-19 02:13:38 +09:00
2 changed files with 2 additions and 2 deletions

View file

@ -64,7 +64,7 @@ void ImageEditor::paint_event(GUI::PaintEvent& event)
painter.add_clip_rect(event.rect());
painter.add_clip_rect(frame_inner_rect());
painter.fill_rect_with_checkerboard(rect(), { 8, 8 }, palette().base().darkened(0.9), palette().base());
Gfx::StylePainter::paint_transparency_grid(painter, rect(), palette());
if (m_image) {
painter.draw_rect(m_editor_image_rect.inflated(2, 2), Color::Black);

View file

@ -186,7 +186,7 @@ void QSWidget::paint_event(GUI::PaintEvent& event)
painter.add_clip_rect(event.rect());
painter.add_clip_rect(frame_inner_rect());
painter.fill_rect_with_checkerboard(frame_inner_rect(), { 8, 8 }, palette().base().darkened(0.9), palette().base());
Gfx::StylePainter::paint_transparency_grid(painter, frame_inner_rect(), palette());
if (!m_bitmap.is_null())
painter.draw_scaled_bitmap(m_bitmap_rect, *m_bitmap, m_bitmap->rect());