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

LibGUI: Move Icon and FontDatabase into the GUI namespace

We also clean up some old references to the old G prefixed GUI classes

This also fixes a potential bug with using: C_OBJECT_ABSTRACT(GAbstractButton)
instead of C_OBJECT_ABSTRACT(AbstractButton)
This commit is contained in:
Shannon Booth 2020-03-07 12:02:21 +13:00 committed by Andreas Kling
parent 57f1c919df
commit 6a3b12664a
24 changed files with 120 additions and 104 deletions

View file

@ -31,15 +31,17 @@
#include <AK/String.h>
#include <LibGfx/Forward.h>
namespace GUI {
struct Metadata {
String path;
bool is_fixed_width;
int glyph_height;
};
class GFontDatabase {
class FontDatabase {
public:
static GFontDatabase& the();
static FontDatabase& the();
RefPtr<Gfx::Font> get_by_name(const StringView&);
void for_each_font(Function<void(const StringView&)>);
@ -51,8 +53,10 @@ public:
}
private:
GFontDatabase();
~GFontDatabase();
FontDatabase();
~FontDatabase();
HashMap<String, Metadata> m_name_to_metadata;
};
}