Ladybird: Fix broken favicon conversion from Gfx::Bitmap to QPixmap

This commit is contained in:
Andreas Kling 2022-07-05 23:09:26 +02:00 committed by Andrew Kaster
parent 48de1fb1b1
commit a7cb558783
Notes: sideshowbarker 2024-07-18 08:59:31 +09:00

View file

@ -207,8 +207,7 @@ public:
virtual void page_did_change_favicon(Gfx::Bitmap const& bitmap) override
{
ByteBuffer bytebuffer = bitmap.serialize_to_byte_buffer();
QPixmap icon = QPixmap::fromImage(QImage(bytebuffer.bytes().data(), bitmap.width(), bitmap.height(), QImage::Format_ARGB32));
QPixmap icon = QPixmap::fromImage(QImage(bitmap.scanline_u8(0), bitmap.width(), bitmap.height(), bitmap.pitch(), QImage::Format_ARGB32));
emit m_view.favicon_changed(QIcon(icon));
}