mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 00:58:12 +00:00
Ladybird: Add Favicon to the window
This commit is contained in:
parent
47d7f1efec
commit
95e3e06a1e
4 changed files with 14 additions and 1 deletions
|
@ -48,6 +48,7 @@
|
|||
#include <LibWebSocket/ConnectionInfo.h>
|
||||
#include <LibWebSocket/Message.h>
|
||||
#include <LibWebSocket/WebSocket.h>
|
||||
#include <QIcon>
|
||||
#include <QMouseEvent>
|
||||
#include <QPaintEvent>
|
||||
#include <QPainter>
|
||||
|
@ -210,8 +211,11 @@ public:
|
|||
m_view.viewport()->update();
|
||||
}
|
||||
|
||||
virtual void page_did_change_favicon(Gfx::Bitmap const&) override
|
||||
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));
|
||||
emit m_view.favicon_changed(QIcon(icon));
|
||||
}
|
||||
|
||||
virtual void page_did_layout() override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue