diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2021-10-26 17:00:10 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-10-31 18:39:13 +0100 |
commit | 53edaa3b2699df6558df9dea3843ffd32201917d (patch) | |
tree | 5891399e198347cf5f731ac665ffea8c21d39bee /Userland/Services/WebContent/ClientConnection.cpp | |
parent | c8550da9c54d819b8c436a7fd69685415e0a1f5f (diff) | |
download | serenity-53edaa3b2699df6558df9dea3843ffd32201917d.zip |
LibWeb+WebContent: Add set_preferred_color_scheme IPC call
This allows the owner of a WebView to override whether to use a dark
theme or not, instead of just using the system theme's IsDark property.
Diffstat (limited to 'Userland/Services/WebContent/ClientConnection.cpp')
-rw-r--r-- | Userland/Services/WebContent/ClientConnection.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Userland/Services/WebContent/ClientConnection.cpp b/Userland/Services/WebContent/ClientConnection.cpp index 7456cc2e07..7787acbf5d 100644 --- a/Userland/Services/WebContent/ClientConnection.cpp +++ b/Userland/Services/WebContent/ClientConnection.cpp @@ -351,4 +351,9 @@ void ClientConnection::set_content_filters(Vector<String> const& filters) Web::ContentFilter::the().add_pattern(filter); } +void ClientConnection::set_preferred_color_scheme(Web::CSS::PreferredColorScheme const& color_scheme) +{ + m_page_host->set_preferred_color_scheme(color_scheme); +} + } |