mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
Ladybird: Fix broken favicon conversion from Gfx::Bitmap to QPixmap
This commit is contained in:
parent
48de1fb1b1
commit
a7cb558783
Notes:
sideshowbarker
2024-07-18 08:59:31 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/a7cb558783 Pull-request: https://github.com/SerenityOS/serenity/pull/16583 Reviewed-by: https://github.com/ADKaster Reviewed-by: https://github.com/linusg
1 changed files with 1 additions and 2 deletions
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue