mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-03 08:05:12 +00:00
Move setting fonts to UiIntegration::startFontsBegin
This commit is contained in:
@@ -183,24 +183,6 @@ Application::~Application() {
|
|||||||
|
|
||||||
void Application::run() {
|
void Application::run() {
|
||||||
Kotato::JsonSettings::Start();
|
Kotato::JsonSettings::Start();
|
||||||
if (!cMainFont().isEmpty()) {
|
|
||||||
style::internal::CustomMainFont = cMainFont();
|
|
||||||
}
|
|
||||||
if (!cSemiboldFont().isEmpty()) {
|
|
||||||
style::internal::CustomSemiboldFont = cSemiboldFont();
|
|
||||||
}
|
|
||||||
if (cSemiboldFontIsBold()) {
|
|
||||||
style::internal::CustomSemiboldIsBold = cSemiboldFontIsBold();
|
|
||||||
}
|
|
||||||
if (!cMonospaceFont().isEmpty()) {
|
|
||||||
style::internal::CustomMonospaceFont = cMonospaceFont();
|
|
||||||
}
|
|
||||||
if (cUseSystemFont()) {
|
|
||||||
style::internal::UseSystemFont = cUseSystemFont();
|
|
||||||
}
|
|
||||||
if (cUseOriginalMetrics()) {
|
|
||||||
style::internal::UseOriginalMetrics = cUseOriginalMetrics();
|
|
||||||
}
|
|
||||||
style::internal::StartFonts();
|
style::internal::StartFonts();
|
||||||
|
|
||||||
ThirdParty::start();
|
ThirdParty::start();
|
||||||
|
@@ -54,6 +54,24 @@ void UiIntegration::activationFromTopPanel() {
|
|||||||
|
|
||||||
void UiIntegration::startFontsBegin() {
|
void UiIntegration::startFontsBegin() {
|
||||||
Platform::FallbackFontConfigCheckBegin();
|
Platform::FallbackFontConfigCheckBegin();
|
||||||
|
if (!cMainFont().isEmpty()) {
|
||||||
|
style::internal::CustomMainFont = cMainFont();
|
||||||
|
}
|
||||||
|
if (!cSemiboldFont().isEmpty()) {
|
||||||
|
style::internal::CustomSemiboldFont = cSemiboldFont();
|
||||||
|
}
|
||||||
|
if (cSemiboldFontIsBold()) {
|
||||||
|
style::internal::CustomSemiboldIsBold = cSemiboldFontIsBold();
|
||||||
|
}
|
||||||
|
if (!cMonospaceFont().isEmpty()) {
|
||||||
|
style::internal::CustomMonospaceFont = cMonospaceFont();
|
||||||
|
}
|
||||||
|
if (cUseSystemFont()) {
|
||||||
|
style::internal::UseSystemFont = cUseSystemFont();
|
||||||
|
}
|
||||||
|
if (cUseOriginalMetrics()) {
|
||||||
|
style::internal::UseOriginalMetrics = cUseOriginalMetrics();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void UiIntegration::startFontsEnd() {
|
void UiIntegration::startFontsEnd() {
|
||||||
|
Reference in New Issue
Block a user