mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:07:44 +00:00
LibGfx+WindowServer: Have WindowServer broadcast system font settings
Instead of everybody getting their system fonts from Gfx::FontDatabase (where it's all hardcoded), they now get it from WindowServer. These are then plumbed into the usual Gfx::FontDatabase places so that the old default_font() and default_fixed_width_font() APIs keep working.
This commit is contained in:
parent
66ad739934
commit
bb23e61fbf
11 changed files with 76 additions and 15 deletions
|
@ -7,6 +7,7 @@
|
|||
#include <AK/Badge.h>
|
||||
#include <AK/Debug.h>
|
||||
#include <LibGfx/Bitmap.h>
|
||||
#include <LibGfx/FontDatabase.h>
|
||||
#include <LibGfx/SystemTheme.h>
|
||||
#include <LibJS/Console.h>
|
||||
#include <LibJS/Heap/Heap.h>
|
||||
|
@ -69,6 +70,12 @@ void ClientConnection::update_system_theme(const Core::AnonymousBuffer& theme_bu
|
|||
m_page_host->set_palette_impl(*impl);
|
||||
}
|
||||
|
||||
void ClientConnection::update_system_fonts(String const& default_font_query, String const& fixed_width_font_query)
|
||||
{
|
||||
Gfx::FontDatabase::set_default_font_query(default_font_query);
|
||||
Gfx::FontDatabase::set_fixed_width_font_query(fixed_width_font_query);
|
||||
}
|
||||
|
||||
void ClientConnection::update_screen_rect(const Gfx::IntRect& rect)
|
||||
{
|
||||
m_page_host->set_screen_rect(rect);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue