mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
LibWeb: Remove now-unnecessary hack from preferred_color_scheme()
This commit is contained in:
parent
b06d2370c1
commit
e4b2e7b131
Notes:
github-actions[bot]
2025-08-04 12:02:12 +00:00
Author: https://github.com/AtkinsSJ
Commit: e4b2e7b131
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5697
Reviewed-by: https://github.com/gmta ✅
1 changed files with 1 additions and 2 deletions
|
|
@ -118,8 +118,7 @@ CSS::PreferredColorScheme Page::preferred_color_scheme() const
|
|||
{
|
||||
auto preferred_color_scheme = m_client->preferred_color_scheme();
|
||||
|
||||
// FIXME: We can't just check for Auto because page().preferred_color_scheme() returns garbage data after startup.
|
||||
if (preferred_color_scheme != CSS::PreferredColorScheme::Dark && preferred_color_scheme != CSS::PreferredColorScheme::Light)
|
||||
if (preferred_color_scheme == CSS::PreferredColorScheme::Auto)
|
||||
preferred_color_scheme = palette().is_dark() ? CSS::PreferredColorScheme::Dark : CSS::PreferredColorScheme::Light;
|
||||
|
||||
return preferred_color_scheme;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue