summaryrefslogtreecommitdiff
path: root/Userland/Services/WindowServer/ConnectionFromClient.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-07-31 18:41:07 +0200
committerAndreas Kling <kling@serenityos.org>2022-08-01 10:29:53 +0200
commit548081ea23f131ae129ff5e1f2ca70ea4eda2da9 (patch)
tree5fca2c60c4da5d4beee5a02ddbdc26276b904c54 /Userland/Services/WindowServer/ConnectionFromClient.cpp
parent419e986dccb95d185b2468f016e69c8f39c03b9d (diff)
downloadserenity-548081ea23f131ae129ff5e1f2ca70ea4eda2da9.zip
Userland+Base: Make the window titlebar font configurable separately
Instead of defaulting to "bold variant of the system default font", let's allow the user to set any font they want as the titlebar font.
Diffstat (limited to 'Userland/Services/WindowServer/ConnectionFromClient.cpp')
-rw-r--r--Userland/Services/WindowServer/ConnectionFromClient.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/Userland/Services/WindowServer/ConnectionFromClient.cpp b/Userland/Services/WindowServer/ConnectionFromClient.cpp
index e4f4353574..0cbad6b1ef 100644
--- a/Userland/Services/WindowServer/ConnectionFromClient.cpp
+++ b/Userland/Services/WindowServer/ConnectionFromClient.cpp
@@ -53,7 +53,7 @@ ConnectionFromClient::ConnectionFromClient(NonnullOwnPtr<Core::Stream::LocalSock
s_connections->set(client_id, *this);
auto& wm = WindowManager::the();
- async_fast_greet(Screen::rects(), Screen::main().index(), wm.window_stack_rows(), wm.window_stack_columns(), Gfx::current_system_theme_buffer(), Gfx::FontDatabase::default_font_query(), Gfx::FontDatabase::fixed_width_font_query(), client_id);
+ async_fast_greet(Screen::rects(), Screen::main().index(), wm.window_stack_rows(), wm.window_stack_columns(), Gfx::current_system_theme_buffer(), Gfx::FontDatabase::default_font_query(), Gfx::FontDatabase::fixed_width_font_query(), Gfx::FontDatabase::window_title_font_query(), client_id);
}
ConnectionFromClient::~ConnectionFromClient()
@@ -891,7 +891,7 @@ Messages::WindowServer::GetCursorThemeResponse ConnectionFromClient::get_cursor_
return name;
}
-Messages::WindowServer::SetSystemFontsResponse ConnectionFromClient::set_system_fonts(String const& default_font_query, String const& fixed_width_font_query)
+Messages::WindowServer::SetSystemFontsResponse ConnectionFromClient::set_system_fonts(String const& default_font_query, String const& fixed_width_font_query, String const& window_title_font_query)
{
if (!Gfx::FontDatabase::the().get_by_name(default_font_query)
|| !Gfx::FontDatabase::the().get_by_name(fixed_width_font_query)) {
@@ -903,9 +903,10 @@ Messages::WindowServer::SetSystemFontsResponse ConnectionFromClient::set_system_
Gfx::FontDatabase::set_default_font_query(default_font_query);
Gfx::FontDatabase::set_fixed_width_font_query(fixed_width_font_query);
+ Gfx::FontDatabase::set_window_title_font_query(window_title_font_query);
ConnectionFromClient::for_each_client([&](auto& client) {
- client.async_update_system_fonts(default_font_query, fixed_width_font_query);
+ client.async_update_system_fonts(default_font_query, fixed_width_font_query, window_title_font_query);
});
WindowManager::the().invalidate_after_theme_or_font_change();
@@ -918,6 +919,7 @@ Messages::WindowServer::SetSystemFontsResponse ConnectionFromClient::set_system_
auto wm_config = wm_config_or_error.release_value();
wm_config->write_entry("Fonts", "Default", default_font_query);
wm_config->write_entry("Fonts", "FixedWidth", fixed_width_font_query);
+ wm_config->write_entry("Fonts", "WindowTitle", window_title_font_query);
return true;
}