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 "core/click_handler_types.h"
|
||||||
#include "ui/basic_click_handlers.h"
|
#include "ui/basic_click_handlers.h"
|
||||||
#include "ui/emoji_config.h"
|
#include "ui/emoji_config.h"
|
||||||
|
#include "ui/style/style_core_custom_font.h"
|
||||||
#include "lang/lang_keys.h"
|
#include "lang/lang_keys.h"
|
||||||
#include "platform/platform_specific.h"
|
#include "platform/platform_specific.h"
|
||||||
#include "boxes/url_auth_box.h"
|
#include "boxes/url_auth_box.h"
|
||||||
|
|
@ -113,28 +114,16 @@ void UiIntegration::activationFromTopPanel() {
|
||||||
Platform::IgnoreApplicationActivationRightNow();
|
Platform::IgnoreApplicationActivationRightNow();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
style::CustomFontSettings UiIntegration::fontSettings() {
|
||||||
void UiIntegration::startFontsBegin() {
|
return {
|
||||||
if (!cMainFont().isEmpty()) {
|
cMainFont(),
|
||||||
style::internal::CustomMainFont = cMainFont();
|
cSemiboldFont(),
|
||||||
}
|
cMonospaceFont(),
|
||||||
if (!cSemiboldFont().isEmpty()) {
|
cSemiboldFontIsBold(),
|
||||||
style::internal::CustomSemiboldFont = cSemiboldFont();
|
cUseSystemFont(),
|
||||||
}
|
cUseOriginalMetrics(),
|
||||||
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();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
bool UiIntegration::screenIsLocked() {
|
bool UiIntegration::screenIsLocked() {
|
||||||
return Global::ScreenIsLocked();
|
return Global::ScreenIsLocked();
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,7 @@ public:
|
||||||
void activationFromTopPanel() override;
|
void activationFromTopPanel() override;
|
||||||
|
|
||||||
bool screenIsLocked() override;
|
bool screenIsLocked() override;
|
||||||
|
style::CustomFontSettings fontSettings() override;
|
||||||
QString timeFormat() override;
|
QString timeFormat() override;
|
||||||
|
|
||||||
std::shared_ptr<ClickHandler> createLinkHandler(
|
std::shared_ptr<ClickHandler> createLinkHandler(
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue