Provide font settings via Ui Integration (#168)
This commit is contained in:
parent
ef4b8c095c
commit
b3cdf4d0d9
2 changed files with 11 additions and 21 deletions
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ public:
|
|||
void activationFromTopPanel() override;
|
||||
|
||||
bool screenIsLocked() override;
|
||||
style::CustomFontSettings fontSettings() override;
|
||||
QString timeFormat() override;
|
||||
|
||||
std::shared_ptr<ClickHandler> createLinkHandler(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue