refactor: Fonts (#5228)

This commit is contained in:
pajlada
2024-03-10 14:27:08 +01:00
committed by GitHub
parent e56f7136a9
commit e7508332ff
16 changed files with 128 additions and 143 deletions
+4 -2
View File
@@ -118,7 +118,7 @@ Application::Application(Settings &_settings, const Paths &paths,
: paths_(paths)
, args_(_args)
, themes(&this->emplace<Theme>())
, fonts(&this->emplace<Fonts>())
, fonts(new Fonts(_settings))
, emotes(&this->emplace<Emotes>())
, accounts(&this->emplace<AccountController>())
, hotkeys(&this->emplace<HotkeyController>())
@@ -170,6 +170,7 @@ void Application::fakeDtor()
this->bttvEmotes.reset();
this->ffzEmotes.reset();
this->seventvEmotes.reset();
this->fonts.reset();
}
void Application::initialize(Settings &settings, const Paths &paths)
@@ -335,8 +336,9 @@ Theme *Application::getThemes()
Fonts *Application::getFonts()
{
assertInGuiThread();
assert(this->fonts);
return this->fonts;
return this->fonts.get();
}
IEmotes *Application::getEmotes()