1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:07:45 +00:00

WindowServer: Allow temporarily overriding the system theme

This patch adds a new api to override the current system theme with an
in memory override theme.
This commit is contained in:
networkException 2022-06-16 20:25:01 +02:00 committed by Linus Groh
parent 278fd28502
commit 976b6156d4
5 changed files with 66 additions and 0 deletions

View file

@ -804,6 +804,27 @@ Messages::WindowServer::GetSystemThemeResponse ConnectionFromClient::get_system_
return name;
}
Messages::WindowServer::SetSystemThemeOverrideResponse ConnectionFromClient::set_system_theme_override(Core::AnonymousBuffer const& theme_override)
{
bool success = WindowManager::the().set_theme_override(theme_override);
return success;
}
Messages::WindowServer::GetSystemThemeOverrideResponse ConnectionFromClient::get_system_theme_override()
{
return WindowManager::the().get_theme_override();
}
void ConnectionFromClient::clear_system_theme_override()
{
WindowManager::the().clear_theme_override();
}
Messages::WindowServer::IsSystemThemeOverriddenResponse ConnectionFromClient::is_system_theme_overridden()
{
return WindowManager::the().is_theme_overridden();
}
void ConnectionFromClient::apply_cursor_theme(String const& name)
{
WindowManager::the().apply_cursor_theme(name);