mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
Applications: Paint transparency grids through StylePainter
This commit is contained in:
parent
7ab04ea31a
commit
59a0e5ba1e
Notes:
sideshowbarker
2024-07-19 02:13:38 +09:00
Author: https://github.com/xTibor Commit: https://github.com/SerenityOS/serenity/commit/59a0e5ba1ed Pull-request: https://github.com/SerenityOS/serenity/pull/3598
2 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
|
|
|
@ -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());
|
||||
|
|
Loading…
Reference in a new issue