mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 05:09:12 +00:00
WebContent+WebWorker: Don't set the color value to the index of an enum
The NamedColor would be casted to its underlying int to fit the ARGB on the left hand side.
This commit is contained in:
parent
eb3b8f8ee4
commit
5b2356b452
Notes:
sideshowbarker
2024-07-17 07:48:42 +09:00
Author: https://github.com/LucasChollet
Commit: 5b2356b452
Pull-request: https://github.com/SerenityOS/serenity/pull/24428
Reviewed-by: https://github.com/nico ✅
2 changed files with 4 additions and 4 deletions
|
@ -145,8 +145,8 @@ void PageClient::setup_palette()
|
|||
VERIFY(!buffer_or_error.is_error());
|
||||
auto buffer = buffer_or_error.release_value();
|
||||
auto* theme = buffer.data<Gfx::SystemTheme>();
|
||||
theme->color[(int)Gfx::ColorRole::Window] = Color::Magenta;
|
||||
theme->color[(int)Gfx::ColorRole::WindowText] = Color::Cyan;
|
||||
theme->color[to_underlying(Gfx::ColorRole::Window)] = Color(Color::Magenta).value();
|
||||
theme->color[to_underlying(Gfx::ColorRole::WindowText)] = Color(Color::Cyan).value();
|
||||
m_palette_impl = Gfx::PaletteImpl::create_with_anonymous_buffer(buffer);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue