1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 06:48:12 +00:00

LibGFX: Move default_xxx_font() methods from Font to FontDatabase

When we have an abstract font class it makes no sense to keep
these methods in the Font class.
This commit is contained in:
Stephan Unverwerth 2020-12-29 18:25:13 +01:00 committed by Andreas Kling
parent 1a072a61fb
commit b4d1390714
48 changed files with 152 additions and 115 deletions

View file

@ -61,6 +61,7 @@
#include <LibGUI/WindowServerConnection.h>
#include <LibGfx/Bitmap.h>
#include <LibGfx/Font.h>
#include <LibGfx/FontDatabase.h>
#include <LibGfx/Palette.h>
#include <unistd.h>
@ -127,7 +128,7 @@ Widget::Widget()
: Core::Object(nullptr, true)
, m_background_role(Gfx::ColorRole::Window)
, m_foreground_role(Gfx::ColorRole::WindowText)
, m_font(Gfx::Font::default_font())
, m_font(Gfx::FontDatabase::default_font())
, m_palette(Application::the()->palette().impl())
{
REGISTER_RECT_PROPERTY("relative_rect", relative_rect, set_relative_rect);
@ -645,7 +646,7 @@ void Widget::set_font(const Gfx::Font* font)
return;
if (!font)
m_font = Gfx::Font::default_font();
m_font = Gfx::FontDatabase::default_font();
else
m_font = *font;