Skip to content

Commit

Permalink
QuickShow: Use checkerboard background to show transparency
Browse files Browse the repository at this point in the history
  • Loading branch information
xTibor authored and awesomekling committed Apr 5, 2020
1 parent e14d278 commit a4f6f8e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Applications/QuickShow/QSWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@
#include <LibGUI/Painter.h>
#include <LibGUI/Window.h>
#include <LibGfx/Bitmap.h>
#include <LibGfx/Palette.h>

QSWidget::QSWidget()
{
set_fill_with_background_color(true);
set_background_color(Color::Black);
set_fill_with_background_color(false);
}

QSWidget::~QSWidget()
Expand Down Expand Up @@ -74,6 +74,7 @@ void QSWidget::paint_event(GUI::PaintEvent& event)
GUI::Painter painter(*this);
painter.add_clip_rect(event.rect());

painter.fill_rect_with_checkerboard(rect(), { 8, 8 }, palette().base().darkened(0.9), palette().base());
painter.draw_scaled_bitmap(m_bitmap_rect, *m_bitmap, m_bitmap->rect());
}

Expand Down

0 comments on commit a4f6f8e

Please sign in to comment.