mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:18:11 +00:00
LibWeb: Port the WebContent service to Core::AnonymousBuffer for themes
This commit is contained in:
parent
04f95f9160
commit
d846808122
4 changed files with 7 additions and 12 deletions
|
@ -49,11 +49,11 @@ PageHost::~PageHost()
|
|||
void PageHost::setup_palette()
|
||||
{
|
||||
// FIXME: Get the proper palette from our peer somehow
|
||||
auto buffer = SharedBuffer::create_with_size(sizeof(Gfx::SystemTheme));
|
||||
auto* theme = buffer->data<Gfx::SystemTheme>();
|
||||
auto buffer = Core::AnonymousBuffer::create_with_size(sizeof(Gfx::SystemTheme));
|
||||
auto* theme = buffer.data<Gfx::SystemTheme>();
|
||||
theme->color[(int)Gfx::ColorRole::Window] = Color::Magenta;
|
||||
theme->color[(int)Gfx::ColorRole::WindowText] = Color::Cyan;
|
||||
m_palette_impl = Gfx::PaletteImpl::create_with_shared_buffer(*buffer);
|
||||
m_palette_impl = Gfx::PaletteImpl::create_with_anonymous_buffer(buffer);
|
||||
}
|
||||
|
||||
Gfx::Palette PageHost::palette() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue