mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 03:35:09 +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:
parent
1a072a61fb
commit
b4d1390714
48 changed files with 152 additions and 115 deletions
|
@ -29,6 +29,7 @@
|
|||
#include <LibGUI/Widget.h>
|
||||
#include <LibGUI/Window.h>
|
||||
#include <LibGfx/Font.h>
|
||||
#include <LibGfx/FontDatabase.h>
|
||||
#include <LibGfx/Palette.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
@ -38,7 +39,7 @@ public:
|
|||
UserNameWidget()
|
||||
{
|
||||
m_username = getlogin();
|
||||
m_username_width = Gfx::Font::default_bold_font().width(m_username);
|
||||
m_username_width = Gfx::FontDatabase::default_bold_font().width(m_username);
|
||||
}
|
||||
|
||||
virtual ~UserNameWidget() override { }
|
||||
|
@ -55,7 +56,7 @@ private:
|
|||
{
|
||||
GUI::Painter painter(*this);
|
||||
painter.fill_rect(event.rect(), palette().window());
|
||||
painter.draw_text(event.rect(), m_username, Gfx::Font::default_bold_font(), Gfx::TextAlignment::Center, palette().window_text());
|
||||
painter.draw_text(event.rect(), m_username, Gfx::FontDatabase::default_bold_font(), Gfx::TextAlignment::Center, palette().window_text());
|
||||
}
|
||||
|
||||
String m_username;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue