Skip to content

Commit

Permalink
Don't fill the rect when painting an ImageBox so PNGs with an alpha c…
Browse files Browse the repository at this point in the history
…hannel show against the dialog's colour.
  • Loading branch information
mjr4077au authored and dpjudas committed Jan 7, 2024
1 parent 31f1cf3 commit a5bb1e4
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/widgets/imagebox/imagebox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ void ImageBox::SetImage(std::shared_ptr<Image> newImage)

void ImageBox::OnPaint(Canvas* canvas)
{
canvas->fillRect(Rect::xywh(0.0, 0.0, GetWidth(), GetHeight()), Colorf::fromRgba8(0, 0, 0));
if (image)
{
canvas->drawImage(image, Point((GetWidth() - (double)image->GetWidth()) * 0.5, (GetHeight() - (double)image->GetHeight()) * 0.5));
Expand Down

0 comments on commit a5bb1e4

Please sign in to comment.