- ZWidget: Remove canvas->fillRect() call in ImageBox::OnPaint().

* This was causing transparent images to sit on a pure black canvas rather than the colour of the dialogue box.
* This change has been submitted upstream also.
This commit is contained in:
Mitchell Richters 2024-01-06 08:24:42 +11:00
parent a5760dc52f
commit 6aa706ce79

View file

@ -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));