2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Add a cheat code to enable freetype on Windows and macOS

This commit is contained in:
Ilya Fedin
2020-05-09 02:37:43 +04:00
committed by John Preston
parent c9553c2d4c
commit 7409d615a3
6 changed files with 69 additions and 6 deletions

View File

@@ -126,6 +126,21 @@ auto GenerateCodes() {
codes.emplace(qsl("export"), [](SessionController *window) {
window->session().data().startExport();
});
#if defined Q_OS_WIN || defined Q_OS_MAC
codes.emplace(qsl("freetype"), [](SessionController *window) {
auto text = cUseFreeType()
#ifdef Q_OS_WIN
? qsl("Switch font engine to GDI?")
#else // Q_OS_WIN
? qsl("Switch font engine to Cocoa?")
#endif // !Q_OS_WIN
: qsl("Switch font engine to FreeType?");
Ui::show(Box<ConfirmBox>(text, [] {
Core::App().switchFreeType();
}));
});
#endif // Q_OS_WIN || Q_OS_MAC
auto audioFilters = qsl("Audio files (*.wav *.mp3);;") + FileDialog::AllFilesFilter();
auto audioKeys = {