/
diev
/
stelegramdesktop-tdesktop
Обзор
Документация
Войти
/
diev
/
stelegramdesktop-tdesktop
Код
Запросы
0
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
dev
Telegram/SourceFiles/ui/chat/chat_style_radius.cpp
61 строка
1 KB
Dragoon Aethis
Add an experimental "small message radius" toggle (#25305)
08 ноя 2022, 13:19
Не верифицирован
08 ноя 2022, 13:19
9d59e42
Код
Авторство
О чём код?
/* This file is part of Telegram Desktop, the official desktop application for the Telegram messaging service. For license and copyright information please follow this link: https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL */ #include "ui/chat/chat_style_radius.h" #include "ui/chat/chat_style.h" #include "base/options.h" #include "ui/chat/chat_theme.h" #include "ui/painter.h" #include "ui/ui_utility.h" #include "styles/style_chat.h" namespace Ui { namespace { base::options::toggle UseSmallMsgBubbleRadius({ .id = kOptionUseSmallMsgBubbleRadius, .name = "Use small message bubble radius", .description = "Makes most message bubbles square-ish.", .restartRequired = true, }); } // namespace const char kOptionUseSmallMsgBubbleRadius[] = "use-small-msg-bubble-radius"; int BubbleRadiusSmall() { return st::bubbleRadiusSmall; } int BubbleRadiusLarge() { static const auto result = [] { if (UseSmallMsgBubbleRadius.value()) { return st::bubbleRadiusSmall; } else { return st::bubbleRadiusLarge; } }(); return result; } int MsgFileThumbRadiusSmall() { return st::msgFileThumbRadiusSmall; } int MsgFileThumbRadiusLarge() { static const auto result = [] { if (UseSmallMsgBubbleRadius.value()) { return st::msgFileThumbRadiusSmall; } else { return st::msgFileThumbRadiusLarge; } }(); return result; } }