Provide font settings via Ui Integration (#168)

This commit is contained in:
ilya-fedin 2021-04-28 09:48:54 +00:00 committed by GitHub
parent ef4b8c095c
commit b3cdf4d0d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 21 deletions

View file

@ -14,6 +14,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "core/click_handler_types.h"
#include "ui/basic_click_handlers.h"
#include "ui/emoji_config.h"
#include "ui/style/style_core_custom_font.h"
#include "lang/lang_keys.h"
#include "platform/platform_specific.h"
#include "boxes/url_auth_box.h"
@ -113,28 +114,16 @@ void UiIntegration::activationFromTopPanel() {
Platform::IgnoreApplicationActivationRightNow();
}
/*
void UiIntegration::startFontsBegin() {
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::CustomFontSettings UiIntegration::fontSettings() {
return {
cMainFont(),
cSemiboldFont(),
cMonospaceFont(),
cSemiboldFontIsBold(),
cUseSystemFont(),
cUseOriginalMetrics(),
};
}
*/
bool UiIntegration::screenIsLocked() {
return Global::ScreenIsLocked();

View file

@ -42,6 +42,7 @@ public:
void activationFromTopPanel() override;
bool screenIsLocked() override;
style::CustomFontSettings fontSettings() override;
QString timeFormat() override;
std::shared_ptr<ClickHandler> createLinkHandler(